From fe83966087348823ae3f5e772defbc3510c22b61 Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Mon, 21 Sep 2026 21:45:05 +0200 Subject: [PATCH] [Theme] Revert default light palette and only include AppColors (#7342) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Theme] Revert default light palette and only include AppColors * [Style] Also remove dark mode palette --------- Co-authored-by: Lukas BrĂ¼bach --- cockatrice/src/interface/theme_manager.cpp | 5 +- .../appearance_settings_page.cpp | 2 +- .../themes/System/palette-default-dark.toml | 68 ++---------------- .../themes/System/palette-default-light.toml | 70 ++----------------- cockatrice/themes/System/theme.cfg | 2 +- 5 files changed, 15 insertions(+), 132 deletions(-) diff --git a/cockatrice/src/interface/theme_manager.cpp b/cockatrice/src/interface/theme_manager.cpp index d86ed77f9..3b03861b9 100644 --- a/cockatrice/src/interface/theme_manager.cpp +++ b/cockatrice/src/interface/theme_manager.cpp @@ -109,7 +109,10 @@ ThemeManager::ThemeManager(QObject *parent) : QObject(parent) ensureThemeDirectoryExists(); #if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) connect(QGuiApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, [this] { - defaultPalette = qApp->palette(); + // Reload so scheme-qualified assets and palettes follow the OS, but do + // NOT recapture defaultPalette: qApp->palette() already carries the + // currently-applied theme palette at this point, so recapturing it + // would contaminate the base for every later theme switch. themeChangedSlot(); }); #endif diff --git a/cockatrice/src/interface/widgets/settings_page/appearance_settings_page.cpp b/cockatrice/src/interface/widgets/settings_page/appearance_settings_page.cpp index f161f0f19..005d77dc9 100644 --- a/cockatrice/src/interface/widgets/settings_page/appearance_settings_page.cpp +++ b/cockatrice/src/interface/widgets/settings_page/appearance_settings_page.cpp @@ -505,7 +505,7 @@ void AppearanceSettingsPage::retranslateUi() openThemeButton.setText(tr("Open themes folder")); schemeComboLabel.setText(tr("Active theme palette:")); styleComboLabel.setText(tr("Active theme style:")); - styleCombo.setToolTip(tr("Qt widget style saved to this theme (\"Default\" lets the application decide)")); + styleCombo.setToolTip(tr("Qt widget style saved to this theme (\"System\" lets the application decide)")); editPaletteButton.setText(tr("Edit theme palette")); homeTabGroupBox->setTitle(tr("Home tab settings")); diff --git a/cockatrice/themes/System/palette-default-dark.toml b/cockatrice/themes/System/palette-default-dark.toml index e101935b4..9dfe6e19f 100644 --- a/cockatrice/themes/System/palette-default-dark.toml +++ b/cockatrice/themes/System/palette-default-dark.toml @@ -1,67 +1,7 @@ -[Palette] -WindowText = #ffffffff -Button = #ff383838 -Light = #ff737373 -Midlight = #ff525252 -Dark = #ff161616 -Mid = #ff252525 -Text = #ffffffff -BrightText = #ffb4dd8b -ButtonText = #ffffffff -Base = #ff2b2b2b -Window = #ff1c1c1c -Shadow = #ff000000 -HighlightedText = #ff000000 -Link = #ffcde4b6 -LinkVisited = #ff99d999 -AlternateBase = #ff242424 -ToolTipBase = #ffffffdc -ToolTipText = #ff000000 -PlaceholderText = #6effffff - -[Palette.Disabled] -WindowText = #ff9d9d9d -Button = #ff1c1c1c -Light = #ff737373 -Midlight = #ff525252 -Dark = #ff161616 -Mid = #ff252525 -Text = #ff9d9d9d -BrightText = #ffb4dd8b -ButtonText = #ff787878 -Base = #ff1c1c1c -Window = #ff1c1c1c -Shadow = #ff000000 -HighlightedText = #ff9d9d9d -Link = #ff308cc6 -LinkVisited = #ffb450ff -AlternateBase = #ff242424 -ToolTipBase = #ffffffdc -ToolTipText = #ff000000 -PlaceholderText = #46ffffff - -[Palette.Inactive] -WindowText = #ffffffff -Button = #ff383838 -Light = #ff737373 -Midlight = #ff525252 -Dark = #ff161616 -Mid = #ff252525 -Text = #ffffffff -BrightText = #ffb4dd8b -ButtonText = #ffffffff -Base = #ff2b2b2b -Window = #ff1c1c1c -Shadow = #ff000000 -HighlightedText = #ffffffff -Link = #ffcde4b6 -LinkVisited = #ff99d999 -AlternateBase = #ff242424 -ToolTipBase = #ffffffdc -ToolTipText = #ff000000 -PlaceholderText = #6effffff - - +# The System theme derives all of its colors from the platform palette +# (e.g. qt6ct's custom color scheme on Linux), so it must NOT ship palette +# overrides. Only the identity app colors are provided here, so buttons keep +# their classic greens while the actual palette stays native to the OS. [AppColors] AccentStrong = #ff148c3c AccentSoft = #ff78c850 diff --git a/cockatrice/themes/System/palette-default-light.toml b/cockatrice/themes/System/palette-default-light.toml index 14c215cdf..9dfe6e19f 100644 --- a/cockatrice/themes/System/palette-default-light.toml +++ b/cockatrice/themes/System/palette-default-light.toml @@ -1,67 +1,7 @@ -[Palette] -WindowText = #ff000000 -Button = #fff0f0f0 -Light = #ffffffff -Midlight = #ffe3e3e3 -Dark = #ffa0a0a0 -Mid = #ffa0a0a0 -Text = #ff000000 -BrightText = #ffffffff -ButtonText = #ff000000 -Base = #ffffffff -Window = #fff0f0f0 -Shadow = #ff696969 -HighlightedText = #ffffffff -Link = #ff0d5f28 -LinkVisited = #ff08401b -AlternateBase = #ffe9e7e3 -ToolTipBase = #ffffffdc -ToolTipText = #ff000000 -PlaceholderText = #80000000 - -[Palette.Disabled] -WindowText = #ff787878 -Button = #fff0f0f0 -Light = #ffffffff -Midlight = #fff7f7f7 -Dark = #ffa0a0a0 -Mid = #ffa0a0a0 -Text = #ff787878 -BrightText = #ffffffff -ButtonText = #ff787878 -Base = #fff0f0f0 -Window = #fff0f0f0 -Shadow = #ff000000 -HighlightedText = #ffffffff -Link = #ff0000ff -LinkVisited = #ffff00ff -AlternateBase = #fff7f7f7 -ToolTipBase = #ffffffdc -ToolTipText = #ff000000 -PlaceholderText = #80000000 - -[Palette.Inactive] -WindowText = #ff000000 -Button = #fff0f0f0 -Light = #ffffffff -Midlight = #ffe3e3e3 -Dark = #ffa0a0a0 -Mid = #ffa0a0a0 -Text = #ff000000 -BrightText = #ffffffff -ButtonText = #ff000000 -Base = #ffffffff -Window = #fff0f0f0 -Shadow = #ff696969 -HighlightedText = #ff000000 -Link = #ff0d5f28 -LinkVisited = #ff08401b -AlternateBase = #ffe9e7e3 -ToolTipBase = #ffffffdc -ToolTipText = #ff000000 -PlaceholderText = #80000000 - - +# The System theme derives all of its colors from the platform palette +# (e.g. qt6ct's custom color scheme on Linux), so it must NOT ship palette +# overrides. Only the identity app colors are provided here, so buttons keep +# their classic greens while the actual palette stays native to the OS. [AppColors] AccentStrong = #ff148c3c -AccentSoft = #ff78c850 \ No newline at end of file +AccentSoft = #ff78c850 diff --git a/cockatrice/themes/System/theme.cfg b/cockatrice/themes/System/theme.cfg index 4b756a5e8..23fffccbb 100644 --- a/cockatrice/themes/System/theme.cfg +++ b/cockatrice/themes/System/theme.cfg @@ -1,5 +1,5 @@ [Appearance] -ColorScheme = Light +ColorScheme = System [Style] Name = System