diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-04-10 11:34:29 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-04-11 19:27:55 +0200 |
commit | cdf4c410bf00edb9604521ab282705f79eb5400f (patch) | |
tree | c68104784e7e3433c2c5ae7284d7ea4d1f9e7cd2 /Userland/Libraries/LibWeb | |
parent | 59848086baf391eb675d4f901e164d721ecb1b88 (diff) | |
download | serenity-cdf4c410bf00edb9604521ab282705f79eb5400f.zip |
LibWeb: Tweak the color used for hovered media controls
The link color is what closely resembled the color I was going for on
the machine I originally developed the controls on. But turns out this
is a very dark blue on most Serenity themes. Instead, hard-code the
original intended color, which is a lighter blue.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp b/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp index b516272d42..3db544eee5 100644 --- a/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/VideoPaintable.cpp @@ -17,13 +17,14 @@ namespace Web::Painting { -static constexpr auto control_box_color = Gfx::Color::from_rgb(0x262626); +static constexpr auto control_box_color = Gfx::Color::from_rgb(0x26'26'26); +static constexpr auto control_highlight_color = Gfx::Color::from_rgb(0x1d'99'f3); -static Gfx::Color control_button_color(PaintContext& context, bool is_hovered) +static constexpr Gfx::Color control_button_color(bool is_hovered) { if (!is_hovered) - return Gfx::Color::from_rgb(0xff'ff'ff); - return context.palette().link(); + return Color::White; + return control_highlight_color; } JS::NonnullGCPtr<VideoPaintable> VideoPaintable::create(Layout::VideoBox const& layout_box) @@ -114,7 +115,7 @@ void VideoPaintable::paint_loaded_video_controls(PaintContext& context, HTML::HT }; auto playback_button_is_hovered = mouse_position.has_value() && playback_button_hover_rect.contains(*mouse_position); - auto playback_button_color = control_button_color(context, playback_button_is_hovered); + auto playback_button_color = control_button_color(playback_button_is_hovered); if (is_paused) { Array<Gfx::IntPoint, 3> play_button_coordinates { { @@ -170,7 +171,7 @@ void VideoPaintable::paint_placeholder_video_controls(PaintContext& context, Dev } }; auto playback_button_is_hovered = mouse_position.has_value() && control_box_rect.contains(*mouse_position); - auto playback_button_color = control_button_color(context, playback_button_is_hovered); + auto playback_button_color = control_button_color(playback_button_is_hovered); Gfx::AntiAliasingPainter painter { context.painter() }; painter.fill_ellipse(control_box_rect.to_type<int>(), control_box_color); |