Skip to content

Commit

Permalink
refactor: update key colors checkbox name
Browse files Browse the repository at this point in the history
also add checkbox to <tabstops>

Co-authored-by: ronso0 <ronso0@mixxx.org>
  • Loading branch information
danferns and ronso0 committed Jul 12, 2024
1 parent ca6d9c1 commit af87ba6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/preferences/dialog/dlgprefcolors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ DlgPrefColors::DlgPrefColors(
this,
&DlgPrefColors::slotReplaceCueColorClicked);

connect(bKeyColorsEnabled,
connect(checkboxKeyColorsEnabled,
&QCheckBox::stateChanged,
this,
&DlgPrefColors::slotKeyColorsEnabled);
Expand All @@ -84,7 +84,7 @@ DlgPrefColors::~DlgPrefColors() {
void DlgPrefColors::slotUpdate() {
comboBoxHotcueColors->clear();
comboBoxTrackColors->clear();
bKeyColorsEnabled->setChecked(
checkboxKeyColorsEnabled->setChecked(
m_pConfig->getValue(kKeyColorsEnabledConfigKey,
BaseTrackTableModel::kKeyColorsEnabledDefault));
for (const auto& palette : std::as_const(mixxx::PredefinedColorPalettes::kPalettes)) {
Expand Down Expand Up @@ -171,7 +171,7 @@ void DlgPrefColors::slotResetToDefaults() {
mixxx::PredefinedColorPalettes::kDefaultTrackColorPalette.size());
comboBoxLoopDefaultColor->setCurrentIndex(
mixxx::PredefinedColorPalettes::kDefaultTrackColorPalette.size() - 1);
bKeyColorsEnabled->setChecked(BaseTrackTableModel::kKeyColorsEnabledDefault);
checkboxKeyColorsEnabled->setChecked(BaseTrackTableModel::kKeyColorsEnabledDefault);
}

// Apply and save any changes made in the dialog
Expand Down Expand Up @@ -227,7 +227,7 @@ void DlgPrefColors::slotApply() {
m_pConfig->setValue(kLoopDefaultColorIndexConfigKey, -1);
}

m_pConfig->setValue(kKeyColorsEnabledConfigKey, bKeyColorsEnabled->checkState());
m_pConfig->setValue(kKeyColorsEnabledConfigKey, checkboxKeyColorsEnabled->checkState());
}

void DlgPrefColors::slotReplaceCueColorClicked() {
Expand Down Expand Up @@ -361,7 +361,7 @@ void DlgPrefColors::slotEditHotcuePaletteClicked() {
void DlgPrefColors::slotKeyColorsEnabled(int i) {
m_bKeyColorsEnabled = static_cast<bool>(i);
BaseTrackTableModel::setKeyColorsEnabled(m_bKeyColorsEnabled);
m_pConfig->setValue(kKeyColorsEnabledConfigKey, bKeyColorsEnabled->checkState());
m_pConfig->setValue(kKeyColorsEnabledConfigKey, checkboxKeyColorsEnabled->checkState());
}

void DlgPrefColors::openColorPaletteEditor(
Expand Down
3 changes: 2 additions & 1 deletion src/preferences/dialog/dlgprefcolorsdlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</item>

<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="bKeyColorsEnabled">
<widget class="QCheckBox" name="checkboxKeyColorsEnabled">
<property name="toolTip">
<string>When key colors are enabled, Mixxx will display a color hint
associated with each key.</string>
Expand Down Expand Up @@ -136,6 +136,7 @@ associated with each key.</string>
<tabstop>pushButtonEditHotcuePalette</tabstop>
<tabstop>comboBoxHotcueDefaultColor</tabstop>
<tabstop>pushButtonReplaceCueColor</tabstop>
<tabstop>checkboxKeyColorsEnabled</tabstop>
</tabstops>
<resources/>
<connections/>
Expand Down

0 comments on commit af87ba6

Please sign in to comment.