1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:55:09 +00:00

LibGUI+LibGfx: Paint scollbar tracks with a dithered pattern

Instead of a solid color, we now paint the track/gutter of scrollbars
using a 2-color dither pattern for a pleasant millennium feel. :^)
This commit is contained in:
Andreas Kling 2020-05-10 01:00:21 +02:00
parent ac701cb589
commit 9e74793ce2
3 changed files with 22 additions and 1 deletions

View file

@ -220,7 +220,7 @@ void ScrollBar::paint_event(PaintEvent& event)
Painter painter(*this);
painter.add_clip_rect(event.rect());
painter.fill_rect(rect(), palette().button().lightened(1.1f));
painter.fill_rect_with_dither_pattern(rect(), palette().button().lightened(1.3f), palette().button());
bool decrement_pressed = m_automatic_scrolling_direction == AutomaticScrollingDirection::Decrement;
bool increment_pressed = m_automatic_scrolling_direction == AutomaticScrollingDirection::Increment;