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

View file

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