diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-28 18:57:36 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-28 18:57:36 +0100 |
commit | fd428d6ed33b9d42b4a347911ec8f7ff825f4407 (patch) | |
tree | 75f39b498c05ed76ade53dbb8bece6487f41a20b /LibGUI/GScrollBar.cpp | |
parent | 8eefdbdce8030ecd242664b17ed3bd67d8eeed7d (diff) | |
download | serenity-fd428d6ed33b9d42b4a347911ec8f7ff825f4407.zip |
SharedGraphics: Make Painter clipping work with translated clip origin.
Diffstat (limited to 'LibGUI/GScrollBar.cpp')
-rw-r--r-- | LibGUI/GScrollBar.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LibGUI/GScrollBar.cpp b/LibGUI/GScrollBar.cpp index c179b3f228..7db74c4e70 100644 --- a/LibGUI/GScrollBar.cpp +++ b/LibGUI/GScrollBar.cpp @@ -181,9 +181,10 @@ Rect GScrollBar::scrubber_rect() const return { (int)x_or_y, 0, button_size(), button_size() }; } -void GScrollBar::paint_event(GPaintEvent&) +void GScrollBar::paint_event(GPaintEvent& event) { Painter painter(*this); + painter.set_clip_rect(event.rect()); painter.fill_rect(rect(), Color(164, 164, 164)); |