summaryrefslogtreecommitdiff
path: root/LibGUI/GScrollBar.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-28 18:57:36 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-28 18:57:36 +0100
commitfd428d6ed33b9d42b4a347911ec8f7ff825f4407 (patch)
tree75f39b498c05ed76ade53dbb8bece6487f41a20b /LibGUI/GScrollBar.cpp
parent8eefdbdce8030ecd242664b17ed3bd67d8eeed7d (diff)
downloadserenity-fd428d6ed33b9d42b4a347911ec8f7ff825f4407.zip
SharedGraphics: Make Painter clipping work with translated clip origin.
Diffstat (limited to 'LibGUI/GScrollBar.cpp')
-rw-r--r--LibGUI/GScrollBar.cpp3
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));