[HomeTab] Also hide shuffle frequency setting on theme background source.

Took 3 minutes
This commit is contained in:
Lukas Brübach 2026-01-13 08:45:27 +01:00
parent a0a8a6e4dd
commit 857b9ca42d
2 changed files with 7 additions and 7 deletions

View file

@ -438,7 +438,7 @@ AppearanceSettingsPage::AppearanceSettingsPage()
connect(&homeTabBackgroundSourceBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this]() {
auto type = homeTabBackgroundSourceBox.currentData().value<BackgroundSources::Type>();
SettingsCache::instance().setHomeTabBackgroundSource(BackgroundSources::toId(type));
updateHomeTabDisplayCardNameVisibility();
updateHomeTabSettingsVisibility();
});
homeTabBackgroundShuffleFrequencySpinBox.setRange(0, 3600);
@ -451,7 +451,7 @@ AppearanceSettingsPage::AppearanceSettingsPage()
connect(&homeTabDisplayCardNameCheckBox, &QCheckBox::QT_STATE_CHANGED, &settings,
&SettingsCache::setHomeTabDisplayCardName);
updateHomeTabDisplayCardNameVisibility();
updateHomeTabSettingsVisibility();
auto *themeGrid = new QGridLayout;
themeGrid->addWidget(&themeLabel, 0, 0);
@ -659,13 +659,13 @@ void AppearanceSettingsPage::openThemeLocation()
}
}
void AppearanceSettingsPage::updateHomeTabDisplayCardNameVisibility()
void AppearanceSettingsPage::updateHomeTabSettingsVisibility()
{
bool visible =
SettingsCache::instance().getHomeTabBackgroundSource() != BackgroundSources::toId(BackgroundSources::Theme);
qInfo() << BackgroundSources::toId(BackgroundSources::Theme);
qInfo() << SettingsCache::instance().getHomeTabBackgroundSource();
qInfo() << visible;
homeTabBackgroundShuffleFrequencyLabel.setVisible(visible);
homeTabBackgroundShuffleFrequencySpinBox.setVisible(visible);
homeTabDisplayCardNameLabel.setVisible(visible);
homeTabDisplayCardNameCheckBox.setVisible(visible);
}

View file

@ -103,7 +103,7 @@ class AppearanceSettingsPage : public AbstractSettingsPage
private slots:
void themeBoxChanged(int index);
void openThemeLocation();
void updateHomeTabDisplayCardNameVisibility();
void updateHomeTabSettingsVisibility();
void showShortcutsChanged(QT_STATE_CHANGED_T enabled);
void overrideAllCardArtWithPersonalPreferenceToggled(QT_STATE_CHANGED_T enabled);