summaryrefslogtreecommitdiff
path: root/src/ui/indicatorwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-16 20:51:11 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-16 20:51:11 +0200
commitbf39a7502fe7592b526f9ac87468d67f99d51ebd (patch)
treede45460ed99bcbfc267028805f2a3b9d2c557833 /src/ui/indicatorwidget.c
parent7f3b18e4c316be1c982ef922ee188718b31d819b (diff)
Progress bar colors; thicker on HiDPI displays
One should be able to see the progress bar in light mode, too. IssueID #101
Diffstat (limited to 'src/ui/indicatorwidget.c')
-rw-r--r--src/ui/indicatorwidget.c12
1 files 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) {
103 const iRect rect = innerBounds_Widget(w); 103 const iRect rect = innerBounds_Widget(w);
104 iPaint p; 104 iPaint p;
105 init_Paint(&p); 105 init_Paint(&p);
106 drawHLine_Paint(&p, 106 int colors[2] = { uiTextCaution_ColorId, uiTextAction_ColorId };
107 topLeft_Rect(rect), 107 if (isLight_ColorTheme(colorTheme_App())) {
108 pos * width_Rect(rect), 108 colors[0] = black_ColorId;
109 isCompleted_IndicatorWidget_(d) ? uiTextAction_ColorId 109 }
110 : uiTextCaution_ColorId); 110 fillRect_Paint(&p,
111 (iRect){ topLeft_Rect(rect), init_I2(pos * width_Rect(rect), gap_UI / 4)},
112 colors[isCompleted_IndicatorWidget_(d) ? 1 : 0]);
111 } 113 }
112} 114}
113 115