From bf39a7502fe7592b526f9ac87468d67f99d51ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= Date: Wed, 16 Dec 2020 20:51:11 +0200 Subject: [PATCH 1/1] Progress bar colors; thicker on HiDPI displays One should be able to see the progress bar in light mode, too. IssueID #101 --- src/ui/indicatorwidget.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ui/indicatorwidget.c b/src/ui/indicatorwidget.c index d43e23d9..96556912 100644 --- a/src/ui/indicatorwidget.c +++ b/src/ui/indicatorwidget.c @@ -103,11 +103,13 @@ void draw_IndicatorWidget_(const iIndicatorWidget *d) { const iRect rect = innerBounds_Widget(w); iPaint p; init_Paint(&p); - drawHLine_Paint(&p, - topLeft_Rect(rect), - pos * width_Rect(rect), - isCompleted_IndicatorWidget_(d) ? uiTextAction_ColorId - : uiTextCaution_ColorId); + int colors[2] = { uiTextCaution_ColorId, uiTextAction_ColorId }; + if (isLight_ColorTheme(colorTheme_App())) { + colors[0] = black_ColorId; + } + fillRect_Paint(&p, + (iRect){ topLeft_Rect(rect), init_I2(pos * width_Rect(rect), gap_UI / 4)}, + colors[isCompleted_IndicatorWidget_(d) ? 1 : 0]); } } -- 2.34.1