From d3b40547f729f495f061a910d4c62c5f49f1d8b4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 25 Dec 2019 21:58:50 +0100 Subject: [PATCH] LibDraw: Fix 1px wide glitch in progress bar painting at some widths Make sure we always line up the "hole" in the progress bar with the right side of the paint rect. This fixes a 1px wide glitch seen when using a darker system theme. --- Libraries/LibDraw/StylePainter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibDraw/StylePainter.cpp b/Libraries/LibDraw/StylePainter.cpp index f176d3dfcb..4773f0abab 100644 --- a/Libraries/LibDraw/StylePainter.cpp +++ b/Libraries/LibDraw/StylePainter.cpp @@ -249,6 +249,7 @@ void StylePainter::paint_progress_bar(Painter& painter, const Rect& rect, const float progress_width = progress * rect.width(); Rect hole_rect { (int)progress_width, 0, (int)(rect.width() - progress_width), rect.height() }; hole_rect.move_by(rect.location()); + hole_rect.set_right_without_resize(rect.right()); PainterStateSaver saver(painter); painter.fill_rect(hole_rect, palette.base());