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 | |
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.
-rw-r--r-- | Libraries/LibDraw/StylePainter.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibDraw/StylePainter.h | 4 | ||||
-rw-r--r-- | Libraries/LibGUI/GSplitter.cpp | 2 |
3 files changed, 7 insertions, 3 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); } }; diff --git a/Libraries/LibGUI/GSplitter.cpp b/Libraries/LibGUI/GSplitter.cpp index 6350f22f08..27273a2cce 100644 --- a/Libraries/LibGUI/GSplitter.cpp +++ b/Libraries/LibGUI/GSplitter.cpp @@ -18,7 +18,7 @@ GSplitter::~GSplitter() void GSplitter::enter_event(CEvent&) { - set_background_color(Color::from_rgb(0xd6d2ce)); + set_background_color(StylePainter::hover_highlight_color()); window()->set_override_cursor(m_orientation == Orientation::Horizontal ? GStandardCursor::ResizeHorizontal : GStandardCursor::ResizeVertical); update(); } |