mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
[HomeTab] Also hide shuffle frequency setting on theme background source.
Took 3 minutes
This commit is contained in:
parent
a0a8a6e4dd
commit
857b9ca42d
2 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue