mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 00:42:19 -07:00
[HomeTab] Fix incorrect handling of invalid backgroundSource setting
This commit is contained in:
parent
a571a9aa04
commit
3e54507a73
2 changed files with 4 additions and 4 deletions
|
|
@ -266,8 +266,8 @@ void HomeWidget::updateConnectButton(const ClientStatus status)
|
||||||
|
|
||||||
QPair<QColor, QColor> HomeWidget::extractDominantColors(const QPixmap &pixmap)
|
QPair<QColor, QColor> HomeWidget::extractDominantColors(const QPixmap &pixmap)
|
||||||
{
|
{
|
||||||
if (themeManager->isBuiltInTheme() && SettingsCache::instance().appearance().getHomeTabBackgroundSource() ==
|
QString sourceId = SettingsCache::instance().appearance().getHomeTabBackgroundSource();
|
||||||
BackgroundSources::toId(BackgroundSources::Theme)) {
|
if (themeManager->isBuiltInTheme() && BackgroundSources::fromId(sourceId) == BackgroundSources::Theme) {
|
||||||
return QPair<QColor, QColor>(QColor::fromRgb(20, 140, 60), QColor::fromRgb(120, 200, 80));
|
return QPair<QColor, QColor>(QColor::fromRgb(20, 140, 60), QColor::fromRgb(120, 200, 80));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -420,8 +420,8 @@ void AppearanceSettingsPage::editPalette()
|
||||||
|
|
||||||
void AppearanceSettingsPage::updateHomeTabSettingsVisibility()
|
void AppearanceSettingsPage::updateHomeTabSettingsVisibility()
|
||||||
{
|
{
|
||||||
bool visible = SettingsCache::instance().appearance().getHomeTabBackgroundSource() !=
|
QString sourceId = SettingsCache::instance().appearance().getHomeTabBackgroundSource();
|
||||||
BackgroundSources::toId(BackgroundSources::Theme);
|
bool visible = BackgroundSources::fromId(sourceId) != BackgroundSources::Theme;
|
||||||
|
|
||||||
homeTabBackgroundShuffleFrequencyLabel.setVisible(visible);
|
homeTabBackgroundShuffleFrequencyLabel.setVisible(visible);
|
||||||
homeTabBackgroundShuffleFrequencySpinBox.setVisible(visible);
|
homeTabBackgroundShuffleFrequencySpinBox.setVisible(visible);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue