diff --git a/Base/res/themes/Basalt.ini b/Base/res/themes/Basalt.ini index fcb9e474d3..5c2be3d4e8 100644 --- a/Base/res/themes/Basalt.ini +++ b/Base/res/themes/Basalt.ini @@ -66,6 +66,8 @@ SyntaxPreprocessorStatement=#ffafff SyntaxPreprocessorValue=orange Tooltip=#1f1f1f TooltipText=white +Tray=#171717 +TrayText=white [Metrics] TitleHeight=24 diff --git a/Base/res/themes/Coffee.ini b/Base/res/themes/Coffee.ini index 7630e6e798..19f3c37a4c 100644 --- a/Base/res/themes/Coffee.ini +++ b/Base/res/themes/Coffee.ini @@ -62,6 +62,8 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=#ffffe1 TooltipText=black +Tray=#9397a5 +TrayText=white [Metrics] TitleButtonWidth=17 diff --git a/Base/res/themes/Dark.ini b/Base/res/themes/Dark.ini index 87f27bcc24..18233c1448 100644 --- a/Base/res/themes/Dark.ini +++ b/Base/res/themes/Dark.ini @@ -58,3 +58,5 @@ SyntaxPreprocessorStatement=darkgray SyntaxPreprocessorValue=orange Tooltip=#444444 TooltipText=white +Tray=#323232 +TrayText=white diff --git a/Base/res/themes/Default.ini b/Base/res/themes/Default.ini index 3b7ab90f77..8ef6b05197 100644 --- a/Base/res/themes/Default.ini +++ b/Base/res/themes/Default.ini @@ -66,6 +66,8 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=#ffffe1 TooltipText=black +Tray=#808080 +TrayText=#ffffff [Metrics] TitleHeight=19 diff --git a/Base/res/themes/Desert.ini b/Base/res/themes/Desert.ini index f22d0a5ee6..5e4c3b8507 100644 --- a/Base/res/themes/Desert.ini +++ b/Base/res/themes/Desert.ini @@ -66,6 +66,8 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=white TooltipText=black +Tray=#a28d68 +TrayText=white [Metrics] TitleHeight=19 diff --git a/Base/res/themes/Faux Pas.ini b/Base/res/themes/Faux Pas.ini index ee214e9271..4ddd705661 100644 --- a/Base/res/themes/Faux Pas.ini +++ b/Base/res/themes/Faux Pas.ini @@ -58,3 +58,5 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=#ffffe1 TooltipText=black +Tray=#282828 +TrayText=white diff --git a/Base/res/themes/Nord.ini b/Base/res/themes/Nord.ini index 3bec5ac37a..d28b7eb246 100644 --- a/Base/res/themes/Nord.ini +++ b/Base/res/themes/Nord.ini @@ -58,3 +58,5 @@ SyntaxPreprocessorStatement=#ffafff SyntaxPreprocessorValue=orange Tooltip=#4c566a TooltipText=white +Tray=#3b4252 +TrayText=white diff --git a/Base/res/themes/Redmond 2000.ini b/Base/res/themes/Redmond 2000.ini index 4369bd23c6..fa94580974 100644 --- a/Base/res/themes/Redmond 2000.ini +++ b/Base/res/themes/Redmond 2000.ini @@ -62,6 +62,8 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=#ffffe1 TooltipText=black +Tray=#808080 +TrayText=white [Metrics] TitleButtonWidth=17 diff --git a/Base/res/themes/Redmond.ini b/Base/res/themes/Redmond.ini index 93488d3f68..7fc008ed1b 100644 --- a/Base/res/themes/Redmond.ini +++ b/Base/res/themes/Redmond.ini @@ -62,6 +62,8 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=#ffffe1 TooltipText=black +Tray=#808080 +TrayText=white [Metrics] TitleButtonWidth=17 diff --git a/Base/res/themes/Silver.ini b/Base/res/themes/Silver.ini index 8b92391ecc..a484458620 100644 --- a/Base/res/themes/Silver.ini +++ b/Base/res/themes/Silver.ini @@ -58,3 +58,5 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=#ffffe1 TooltipText=black +Tray=#3b3b3b +TrayText=white diff --git a/Base/res/themes/Sunshine.ini b/Base/res/themes/Sunshine.ini index 48033c79e1..08c03795ec 100644 --- a/Base/res/themes/Sunshine.ini +++ b/Base/res/themes/Sunshine.ini @@ -62,6 +62,8 @@ SyntaxPreprocessorStatement=#008080 SyntaxPreprocessorValue=#800000 Tooltip=#ffffe1 TooltipText=black +Tray=#9397a5 +TrayText=white [Paths] TitleButtonIcons=/res/icons/themes/Sunshine/16x16/ diff --git a/Userland/Libraries/LibGfx/ClassicStylePainter.cpp b/Userland/Libraries/LibGfx/ClassicStylePainter.cpp index b90b9d7a00..b36ba1c81f 100644 --- a/Userland/Libraries/LibGfx/ClassicStylePainter.cpp +++ b/Userland/Libraries/LibGfx/ClassicStylePainter.cpp @@ -170,7 +170,7 @@ void ClassicStylePainter::paint_button(Painter& painter, const IntRect& rect, co Color button_color = palette.button(); Color highlight_color = palette.threed_highlight(); - Color shadow_color = palette.threed_shadow1(); + Color shadow_color = button_style == ButtonStyle::CoolBar ? palette.threed_shadow1() : palette.threed_shadow2(); PainterStateSaver saver(painter); painter.translate(rect.location()); @@ -178,10 +178,12 @@ void ClassicStylePainter::paint_button(Painter& painter, const IntRect& rect, co if (pressed || checked) { // Base IntRect base_rect { 1, 1, rect.width() - 2, rect.height() - 2 }; - if (checked && !pressed) { - painter.fill_rect_with_dither_pattern(base_rect, palette.button().lightened(1.3f), palette.button()); - } else { - painter.fill_rect(base_rect, button_color); + if (button_style == ButtonStyle::CoolBar) { + if (checked && !pressed) { + painter.fill_rect_with_dither_pattern(base_rect, palette.button().lightened(1.3f), Color()); + } else { + painter.fill_rect(base_rect, button_color); + } } // Sunken shadow @@ -191,9 +193,11 @@ void ClassicStylePainter::paint_button(Painter& painter, const IntRect& rect, co // Bottom highlight painter.draw_line({ rect.width() - 2, 1 }, { rect.width() - 2, rect.height() - 3 }, highlight_color); painter.draw_line({ 1, rect.height() - 2 }, { rect.width() - 2, rect.height() - 2 }, highlight_color); - } else if (button_style == ButtonStyle::CoolBar && hovered) { - // Base - painter.fill_rect({ 1, 1, rect.width() - 2, rect.height() - 2 }, button_color); + } else if (hovered) { + if (button_style == ButtonStyle::CoolBar) { + // Base + painter.fill_rect({ 1, 1, rect.width() - 2, rect.height() - 2 }, button_color); + } // Top highlight painter.draw_line({ 1, 1 }, { rect.width() - 2, 1 }, highlight_color); diff --git a/Userland/Libraries/LibGfx/StylePainter.h b/Userland/Libraries/LibGfx/StylePainter.h index 0969178f1e..41ee5e1415 100644 --- a/Userland/Libraries/LibGfx/StylePainter.h +++ b/Userland/Libraries/LibGfx/StylePainter.h @@ -33,7 +33,8 @@ namespace Gfx { enum class ButtonStyle { Normal, - CoolBar + CoolBar, + Tray, }; enum class FrameShadow { Plain, diff --git a/Userland/Libraries/LibGfx/SystemTheme.h b/Userland/Libraries/LibGfx/SystemTheme.h index a15a6af780..85e1e9569f 100644 --- a/Userland/Libraries/LibGfx/SystemTheme.h +++ b/Userland/Libraries/LibGfx/SystemTheme.h @@ -99,6 +99,8 @@ namespace Gfx { C(ThreedShadow2) \ C(Tooltip) \ C(TooltipText) \ + C(Tray) \ + C(TrayText) \ C(VisitedLink) \ C(Window) \ C(WindowText)