1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:17:35 +00:00

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.
This commit is contained in:
Andreas Kling 2019-07-27 11:15:20 +02:00
parent 34ccc7b4a7
commit 7cd2e739f2
3 changed files with 7 additions and 3 deletions

View file

@ -9,7 +9,7 @@ void StylePainter::paint_tab_button(Painter& painter, const Rect& rect, bool act
Color shadow_color2 = Color::from_rgb(0x404040); Color shadow_color2 = Color::from_rgb(0x404040);
if (hovered && enabled && !active) if (hovered && enabled && !active)
base_color = Color::from_rgb(0xd4d4d4); base_color = StylePainter::hover_highlight_color();
PainterStateSaver saver(painter); PainterStateSaver saver(painter);
painter.translate(rect.location()); painter.translate(rect.location());
@ -55,7 +55,7 @@ static void paint_button_new(Painter& painter, const Rect& rect, bool pressed, b
else else
button_color = Color::from_rgb(0xd6d2ce); button_color = Color::from_rgb(0xd6d2ce);
} else if (hovered && enabled) } else if (hovered && enabled)
button_color = Color::from_rgb(0xd4d4d4); button_color = StylePainter::hover_highlight_color();
PainterStateSaver saver(painter); PainterStateSaver saver(painter);
painter.translate(rect.location()); painter.translate(rect.location());

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <LibDraw/Color.h>
class Painter; class Painter;
class Rect; 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_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_frame(Painter&, const Rect&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false);
static void paint_window_frame(Painter&, const Rect&); static void paint_window_frame(Painter&, const Rect&);
static Color hover_highlight_color() { return Color::from_rgb(0xe6e5e2); }
}; };

View file

@ -18,7 +18,7 @@ GSplitter::~GSplitter()
void GSplitter::enter_event(CEvent&) 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); window()->set_override_cursor(m_orientation == Orientation::Horizontal ? GStandardCursor::ResizeHorizontal : GStandardCursor::ResizeVertical);
update(); update();
} }