summaryrefslogtreecommitdiff
path: root/LibGUI
diff options
context:
space:
mode:
Diffstat (limited to 'LibGUI')
-rw-r--r--LibGUI/GScrollBar.cpp3
-rw-r--r--LibGUI/GStatusBar.cpp3
-rw-r--r--LibGUI/GTableView.cpp3
3 files changed, 6 insertions, 3 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));
diff --git a/LibGUI/GStatusBar.cpp b/LibGUI/GStatusBar.cpp
index 77e38090be..2712715bde 100644
--- a/LibGUI/GStatusBar.cpp
+++ b/LibGUI/GStatusBar.cpp
@@ -28,9 +28,10 @@ String GStatusBar::text() const
return m_label->text();
}
-void GStatusBar::paint_event(GPaintEvent&)
+void GStatusBar::paint_event(GPaintEvent& event)
{
Painter painter(*this);
+ painter.set_clip_rect(event.rect());
painter.fill_rect({ 0, 1, width(), height() - 1 }, Color::LightGray);
painter.draw_line({ 0, 0 }, { width() - 1, 0 }, Color::DarkGray);
}
diff --git a/LibGUI/GTableView.cpp b/LibGUI/GTableView.cpp
index 8c6042604a..df18c6bd83 100644
--- a/LibGUI/GTableView.cpp
+++ b/LibGUI/GTableView.cpp
@@ -92,9 +92,10 @@ void GTableView::mousedown_event(GMouseEvent& event)
update();
}
-void GTableView::paint_event(GPaintEvent&)
+void GTableView::paint_event(GPaintEvent& event)
{
Painter painter(*this);
+ painter.set_clip_rect(event.rect());
painter.translate(-m_horizontal_scrollbar->value(), -m_vertical_scrollbar->value());
int exposed_width = max(content_width(), width());