From 0496ede62f8b86e1885d594e3aa5320c96b708eb Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 6 Jan 2018 14:40:02 +0100 Subject: GUI: Implement dirty-checking for widget redraws --- gui/widgets/scrollbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui/widgets/scrollbar.cpp') diff --git a/gui/widgets/scrollbar.cpp b/gui/widgets/scrollbar.cpp index d8bcb18336..b0e2576ec1 100644 --- a/gui/widgets/scrollbar.cpp +++ b/gui/widgets/scrollbar.cpp @@ -135,7 +135,7 @@ void ScrollBarWidget::handleMouseMoved(int x, int y, int button) { _part = kSliderPart; if (old_part != _part) - draw(); + markAsDirty(); } } @@ -165,7 +165,7 @@ void ScrollBarWidget::checkBounds(int old_pos) { if (old_pos != _currentPos) { recalc(); - draw(); + markAsDirty(); sendCommand(kSetPositionCmd, _currentPos); } } -- cgit v1.2.3