Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove auto hotcue colors option #2578

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions src/preferences/dialog/dlgprefcolors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,4 @@ void DlgPrefColors::slotApply() {
m_colorPaletteSettings.getColorPalette(trackColorPaletteName,
m_colorPaletteSettings.getTrackColorPalette()));
}

m_pConfig->setValue(
ConfigKey("[Controls]", "auto_hotcue_colors"),
checkBoxAssignHotcueColors->isChecked());
}
34 changes: 7 additions & 27 deletions src/preferences/dialog/dlgprefcolorsdlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,8 @@
<string>Colors</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelHotcueColors">
<property name="text">
<string>Hotcues:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxHotcueColors"/>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxTrackColors"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelTrackColors">
Expand All @@ -43,28 +36,15 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxTrackColors"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelAutoHotcueColors">
<item row="0" column="0">
<widget class="QLabel" name="labelHotcueColors">
<property name="text">
<string>Auto hotcue colors</string>
</property>
<property name="buddy">
<cstring>checkBoxAssignHotcueColors</cstring>
<string>Hotcues:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="checkBoxAssignHotcueColors">
<property name="toolTip">
<string>Automatically assigns a predefined color to a newly created hotcue point, based on its index.</string>
</property>
<property name="text">
<string>Assign predefined colors to newly created hotcue points</string>
</property>
</widget>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxHotcueColors"/>
</item>
</layout>
</widget>
Expand Down
1 change: 0 additions & 1 deletion src/preferences/dialog/dlgprefdeck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 18 additions & 2 deletions src/util/color/predefinedcolorpalettes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -124,6 +123,22 @@ const ColorPalette PredefinedColorPalettes::kMixxxHotcueColorPalette =
kColorMixxxWhite,
});

const ColorPalette PredefinedColorPalettes::kMixxxHotcueColorPaletteWithDefaultColor =
ColorPalette(
QStringLiteral("Mixxx Hotcue Colors (with default color)"),
QList<mixxx::RgbColor>{
kColorMixxxRed,
kColorMixxxYellow,
kColorMixxxGreen,
kColorMixxxCeleste,
kColorMixxxBlue,
kColorMixxxPurple,
kColorMixxxPink,
kColorMixxxWhite,
kSchemaMigrationReplacementColor,
},
QList<unsigned int>{8});

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the use cases for kMixxxHotcueColorPaletteWithDefaultColor and kMixxxHotcueColorPalette?
How about adding orange to the kMixxxHotcueColorPalette?

const ColorPalette PredefinedColorPalettes::kSeratoDJIntroHotcueColorPalette =
ColorPalette(
QStringLiteral("Serato DJ Intro Hotcue Colors"),
Expand Down Expand Up @@ -249,6 +264,7 @@ const ColorPalette PredefinedColorPalettes::kDefaultTrackColorPalette =
const QList<ColorPalette> PredefinedColorPalettes::kPalettes{
// Hotcue Color Palettes
mixxx::PredefinedColorPalettes::kMixxxHotcueColorPalette,
mixxx::PredefinedColorPalettes::kMixxxHotcueColorPaletteWithDefaultColor,
mixxx::PredefinedColorPalettes::kSeratoDJProHotcueColorPalette,
mixxx::PredefinedColorPalettes::kSeratoDJIntroHotcueColorPalette,

Expand Down
1 change: 1 addition & 0 deletions src/util/color/predefinedcolorpalettes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down