summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-08-01 13:09:18 -0400
committerAndreas Kling <kling@serenityos.org>2020-08-01 19:26:54 +0200
commit6dd10ad8dce61219d3846722f1b1de1ebb846aa0 (patch)
tree0b32c85f524b589be4f2fdd7fbb4114968bdd1d6 /Libraries
parentd366ad8232b943a3035e16cbe0a9b6b9bd8bdc87 (diff)
downloadserenity-6dd10ad8dce61219d3846722f1b1de1ebb846aa0.zip
Themes: Fix default theme window stripes and shadow after #2811
Change #2811 made window title stripes and window title shadow themable, but it used the same stripe and shadow color for all window modes. This is fine for the new 'basalt' theme which uses the same color in all four window modes, but it changed the default theme so that background windows had brown stripes and a brown shadow. Instead, make the title stripe and title shadow themable per window mode, and change the default theme to restore the colors it had before change #2811: The title stripe color is the same as Border1 for all window modes, and the title shadow is the same as the title stripe darkened by 0.6.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGfx/Palette.h10
-rw-r--r--Libraries/LibGfx/SystemTheme.cpp10
-rw-r--r--Libraries/LibGfx/SystemTheme.h10
3 files changed, 24 insertions, 6 deletions
diff --git a/Libraries/LibGfx/Palette.h b/Libraries/LibGfx/Palette.h
index 6dc43e431d..dc28a17f9d 100644
--- a/Libraries/LibGfx/Palette.h
+++ b/Libraries/LibGfx/Palette.h
@@ -72,17 +72,23 @@ public:
Color active_window_border1() const { return color(ColorRole::ActiveWindowBorder1); }
Color active_window_border2() const { return color(ColorRole::ActiveWindowBorder2); }
Color active_window_title() const { return color(ColorRole::ActiveWindowTitle); }
+ Color active_window_title_stripes() const { return color(ColorRole::ActiveWindowTitleStripes); }
+ Color active_window_title_shadow() const { return color(ColorRole::ActiveWindowTitleShadow); }
Color inactive_window_border1() const { return color(ColorRole::InactiveWindowBorder1); }
Color inactive_window_border2() const { return color(ColorRole::InactiveWindowBorder2); }
Color inactive_window_title() const { return color(ColorRole::InactiveWindowTitle); }
+ Color inactive_window_title_stripes() const { return color(ColorRole::InactiveWindowTitleStripes); }
+ Color inactive_window_title_shadow() const { return color(ColorRole::InactiveWindowTitleShadow); }
Color moving_window_border1() const { return color(ColorRole::MovingWindowBorder1); }
Color moving_window_border2() const { return color(ColorRole::MovingWindowBorder2); }
Color moving_window_title() const { return color(ColorRole::MovingWindowTitle); }
+ Color moving_window_title_stripes() const { return color(ColorRole::MovingWindowTitleStripes); }
+ Color moving_window_title_shadow() const { return color(ColorRole::MovingWindowTitleShadow); }
Color highlight_window_border1() const { return color(ColorRole::HighlightWindowBorder1); }
Color highlight_window_border2() const { return color(ColorRole::HighlightWindowBorder2); }
Color highlight_window_title() const { return color(ColorRole::HighlightWindowTitle); }
- Color window_title_stripes() const { return color(ColorRole::WindowTitleStripes); }
- Color window_title_shadow() const { return color(ColorRole::WindowTitleShadow); }
+ Color highlight_window_title_stripes() const { return color(ColorRole::HighlightWindowTitleStripes); }
+ Color highlight_window_title_shadow() const { return color(ColorRole::HighlightWindowTitleShadow); }
Color menu_stripe() const { return color(ColorRole::MenuStripe); }
Color menu_base() const { return color(ColorRole::MenuBase); }
Color menu_base_text() const { return color(ColorRole::MenuBaseText); }
diff --git a/Libraries/LibGfx/SystemTheme.cpp b/Libraries/LibGfx/SystemTheme.cpp
index 35ccf43c0e..9edeadae25 100644
--- a/Libraries/LibGfx/SystemTheme.cpp
+++ b/Libraries/LibGfx/SystemTheme.cpp
@@ -120,17 +120,23 @@ RefPtr<SharedBuffer> load_system_theme(const String& path)
DO_COLOR(ActiveWindowBorder1);
DO_COLOR(ActiveWindowBorder2);
DO_COLOR(ActiveWindowTitle);
+ DO_COLOR(ActiveWindowTitleShadow);
+ DO_COLOR(ActiveWindowTitleStripes);
DO_COLOR(InactiveWindowBorder1);
DO_COLOR(InactiveWindowBorder2);
DO_COLOR(InactiveWindowTitle);
+ DO_COLOR(InactiveWindowTitleShadow);
+ DO_COLOR(InactiveWindowTitleStripes);
DO_COLOR(MovingWindowBorder1);
DO_COLOR(MovingWindowBorder2);
DO_COLOR(MovingWindowTitle);
+ DO_COLOR(MovingWindowTitleShadow);
+ DO_COLOR(MovingWindowTitleStripes);
DO_COLOR(HighlightWindowBorder1);
DO_COLOR(HighlightWindowBorder2);
DO_COLOR(HighlightWindowTitle);
- DO_COLOR(WindowTitleShadow);
- DO_COLOR(WindowTitleStripes);
+ DO_COLOR(HighlightWindowTitleShadow);
+ DO_COLOR(HighlightWindowTitleStripes);
DO_COLOR(MenuStripe);
DO_COLOR(MenuBase);
DO_COLOR(MenuBaseText);
diff --git a/Libraries/LibGfx/SystemTheme.h b/Libraries/LibGfx/SystemTheme.h
index 244de1a54d..bd8131f0e5 100644
--- a/Libraries/LibGfx/SystemTheme.h
+++ b/Libraries/LibGfx/SystemTheme.h
@@ -39,17 +39,23 @@ enum class ColorRole {
ActiveWindowBorder1,
ActiveWindowBorder2,
ActiveWindowTitle,
+ ActiveWindowTitleShadow,
+ ActiveWindowTitleStripes,
InactiveWindowBorder1,
InactiveWindowBorder2,
InactiveWindowTitle,
+ InactiveWindowTitleShadow,
+ InactiveWindowTitleStripes,
MovingWindowBorder1,
MovingWindowBorder2,
MovingWindowTitle,
+ MovingWindowTitleShadow,
+ MovingWindowTitleStripes,
HighlightWindowBorder1,
HighlightWindowBorder2,
HighlightWindowTitle,
- WindowTitleShadow,
- WindowTitleStripes,
+ HighlightWindowTitleStripes,
+ HighlightWindowTitleShadow,
MenuStripe,
MenuBase,
MenuBaseText,