From 9adb9a966d665696eb0d7ed4c52753fa99786023 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 20 Mar 2020 19:01:15 +0100 Subject: [PATCH 1/3] preferences/dialog/dlgprefdeck: Remove leftover member variable --- src/preferences/dialog/dlgprefdeck.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/preferences/dialog/dlgprefdeck.h b/src/preferences/dialog/dlgprefdeck.h index 96bc1914401..67160882d16 100644 --- a/src/preferences/dialog/dlgprefdeck.h +++ b/src/preferences/dialog/dlgprefdeck.h @@ -125,7 +125,6 @@ class DlgPrefDeck : public DlgPreferencePage, public Ui::DlgPrefDeckDlg { bool m_bSetIntroStartAtMainCue; bool m_bDisallowTrackLoadToPlayingDeck; bool m_bCloneDeckOnLoadDoubleTap; - bool m_bAssignHotcueColors; int m_iRateRangePercent; bool m_bRateInverted; From 762de07d2d376a9da01979bcf0d8a43be97f1931 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 20 Mar 2020 18:59:15 +0100 Subject: [PATCH 2/3] preferences: Remove auto_hotcue_colors option This option is obsolete now that the same can be archieved using the palette editor. --- src/engine/controls/cuecontrol.cpp | 9 ++---- src/preferences/dialog/dlgprefcolors.cpp | 4 --- src/preferences/dialog/dlgprefcolorsdlg.ui | 34 +++++----------------- src/util/color/predefinedcolorpalettes.cpp | 3 +- 4 files changed, 10 insertions(+), 40 deletions(-) diff --git a/src/engine/controls/cuecontrol.cpp b/src/engine/controls/cuecontrol.cpp index ebb89fd413c..d9343b1dc42 100644 --- a/src/engine/controls/cuecontrol.cpp +++ b/src/engine/controls/cuecontrol.cpp @@ -618,13 +618,8 @@ void CueControl::hotcueSet(HotcueControl* pControl, double v) { pCue->setLabel(); pCue->setType(mixxx::CueType::HotCue); - ConfigKey autoHotcueColorsKey("[Controls]", "auto_hotcue_colors"); - if (getConfig()->getValue(autoHotcueColorsKey, false)) { - auto hotcueColorPalette = m_colorPaletteSettings.getHotcueColorPalette(); - pCue->setColor(hotcueColorPalette.colorForHotcueIndex(hotcue)); - } else { - pCue->setColor(mixxx::PredefinedColorPalettes::kDefaultCueColor); - } + auto hotcueColorPalette = m_colorPaletteSettings.getHotcueColorPalette(); + pCue->setColor(hotcueColorPalette.colorForHotcueIndex(hotcue)); // TODO(XXX) deal with spurious signals attachCue(pCue, pControl); diff --git a/src/preferences/dialog/dlgprefcolors.cpp b/src/preferences/dialog/dlgprefcolors.cpp index 6888e8db98b..657de07fa1b 100644 --- a/src/preferences/dialog/dlgprefcolors.cpp +++ b/src/preferences/dialog/dlgprefcolors.cpp @@ -93,8 +93,4 @@ void DlgPrefColors::slotApply() { m_colorPaletteSettings.getColorPalette(trackColorPaletteName, m_colorPaletteSettings.getTrackColorPalette())); } - - m_pConfig->setValue( - ConfigKey("[Controls]", "auto_hotcue_colors"), - checkBoxAssignHotcueColors->isChecked()); } diff --git a/src/preferences/dialog/dlgprefcolorsdlg.ui b/src/preferences/dialog/dlgprefcolorsdlg.ui index 08bf006daa6..88f9603722c 100644 --- a/src/preferences/dialog/dlgprefcolorsdlg.ui +++ b/src/preferences/dialog/dlgprefcolorsdlg.ui @@ -26,15 +26,8 @@ Colors - - - - Hotcues: - - - - - + + @@ -43,28 +36,15 @@ - - - - - + + - Auto hotcue colors - - - checkBoxAssignHotcueColors + Hotcues: - - - - Automatically assigns a predefined color to a newly created hotcue point, based on its index. - - - Assign predefined colors to newly created hotcue points - - + + diff --git a/src/util/color/predefinedcolorpalettes.cpp b/src/util/color/predefinedcolorpalettes.cpp index db6deb0ed7b..f58467328e4 100644 --- a/src/util/color/predefinedcolorpalettes.cpp +++ b/src/util/color/predefinedcolorpalettes.cpp @@ -102,8 +102,7 @@ constexpr mixxx::RgbColor kVirtualDJTrackColorBlue(0x0000FF); constexpr mixxx::RgbColor kVirtualDJTrackColorFuchsia(0xFF00FF); constexpr mixxx::RgbColor kVirtualDJTrackColorWhite(0xFFFFFF); -// Replaces "no color" values and is used for new cues if auto_hotcue_colors is -// disabled +// Replaces "no color" values constexpr mixxx::RgbColor kSchemaMigrationReplacementColor(0xFF8000); } // anonymous namespace From cae9a53aba1e57c0ebec90a26c4189fd0ea4a280 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 20 Mar 2020 19:01:53 +0100 Subject: [PATCH 3/3] util/color/predefinedcolorpalettes: Add hotcue palette with default color --- src/util/color/predefinedcolorpalettes.cpp | 17 +++++++++++++++++ src/util/color/predefinedcolorpalettes.h | 1 + 2 files changed, 18 insertions(+) diff --git a/src/util/color/predefinedcolorpalettes.cpp b/src/util/color/predefinedcolorpalettes.cpp index f58467328e4..e49faeef068 100644 --- a/src/util/color/predefinedcolorpalettes.cpp +++ b/src/util/color/predefinedcolorpalettes.cpp @@ -123,6 +123,22 @@ const ColorPalette PredefinedColorPalettes::kMixxxHotcueColorPalette = kColorMixxxWhite, }); +const ColorPalette PredefinedColorPalettes::kMixxxHotcueColorPaletteWithDefaultColor = + ColorPalette( + QStringLiteral("Mixxx Hotcue Colors (with default color)"), + QList{ + kColorMixxxRed, + kColorMixxxYellow, + kColorMixxxGreen, + kColorMixxxCeleste, + kColorMixxxBlue, + kColorMixxxPurple, + kColorMixxxPink, + kColorMixxxWhite, + kSchemaMigrationReplacementColor, + }, + QList{8}); + const ColorPalette PredefinedColorPalettes::kSeratoDJIntroHotcueColorPalette = ColorPalette( QStringLiteral("Serato DJ Intro Hotcue Colors"), @@ -248,6 +264,7 @@ const ColorPalette PredefinedColorPalettes::kDefaultTrackColorPalette = const QList PredefinedColorPalettes::kPalettes{ // Hotcue Color Palettes mixxx::PredefinedColorPalettes::kMixxxHotcueColorPalette, + mixxx::PredefinedColorPalettes::kMixxxHotcueColorPaletteWithDefaultColor, mixxx::PredefinedColorPalettes::kSeratoDJProHotcueColorPalette, mixxx::PredefinedColorPalettes::kSeratoDJIntroHotcueColorPalette, diff --git a/src/util/color/predefinedcolorpalettes.h b/src/util/color/predefinedcolorpalettes.h index a1f910fc3be..9e88b084b38 100644 --- a/src/util/color/predefinedcolorpalettes.h +++ b/src/util/color/predefinedcolorpalettes.h @@ -6,6 +6,7 @@ namespace mixxx { class PredefinedColorPalettes { public: static const ColorPalette kMixxxHotcueColorPalette; + static const ColorPalette kMixxxHotcueColorPaletteWithDefaultColor; static const ColorPalette kSeratoDJIntroHotcueColorPalette; static const ColorPalette kSeratoDJProHotcueColorPalette;