diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-27 11:15:20 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-27 11:16:10 +0200 |
commit | 7cd2e739f23856223abf91304e0a35294161d67f (patch) | |
tree | a23e2103676d4ada7ec5c7e5be6f8aafcb1c7491 /Libraries/LibDraw | |
parent | 34ccc7b4a7a503999a225d547210abba5740b485 (diff) | |
download | serenity-7cd2e739f23856223abf91304e0a35294161d67f.zip |
LibDraw: Tweak the hover highlight color.
It was a tad too bright. Also make sure we're using the same color in
all the different places. At some point it would be nice to improve global
color settings, etc.
Diffstat (limited to 'Libraries/LibDraw')
-rw-r--r-- | Libraries/LibDraw/StylePainter.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibDraw/StylePainter.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Libraries/LibDraw/StylePainter.cpp b/Libraries/LibDraw/StylePainter.cpp index 7e878a66da..70971b77cf 100644 --- a/Libraries/LibDraw/StylePainter.cpp +++ b/Libraries/LibDraw/StylePainter.cpp @@ -9,7 +9,7 @@ void StylePainter::paint_tab_button(Painter& painter, const Rect& rect, bool act Color shadow_color2 = Color::from_rgb(0x404040); if (hovered && enabled && !active) - base_color = Color::from_rgb(0xd4d4d4); + base_color = StylePainter::hover_highlight_color(); PainterStateSaver saver(painter); painter.translate(rect.location()); @@ -55,7 +55,7 @@ static void paint_button_new(Painter& painter, const Rect& rect, bool pressed, b else button_color = Color::from_rgb(0xd6d2ce); } else if (hovered && enabled) - button_color = Color::from_rgb(0xd4d4d4); + button_color = StylePainter::hover_highlight_color(); PainterStateSaver saver(painter); painter.translate(rect.location()); diff --git a/Libraries/LibDraw/StylePainter.h b/Libraries/LibDraw/StylePainter.h index 996c63c62f..6bc85251ab 100644 --- a/Libraries/LibDraw/StylePainter.h +++ b/Libraries/LibDraw/StylePainter.h @@ -1,5 +1,7 @@ #pragma once +#include <LibDraw/Color.h> + class Painter; class Rect; @@ -28,4 +30,6 @@ public: static void paint_surface(Painter&, const Rect&, bool paint_vertical_lines = true, bool paint_top_line = true); static void paint_frame(Painter&, const Rect&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false); static void paint_window_frame(Painter&, const Rect&); + + static Color hover_highlight_color() { return Color::from_rgb(0xe6e5e2); } }; |