Skip to content

Commit d428170

Browse files
committed
Improve progress bar theming
1 parent 826b4d2 commit d428170

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

userspace/py/bin/progress-bar.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ def draw_progress_bar(ctx,x,y,w,h,percent):
3636
ctx.set_source_rgb(217/255,217/255,217/255)
3737
ctx.fill()
3838

39-
rounded_rectangle(ctx,x+2,y+2,(w-4) * percent,h-4,4)
40-
ctx.set_source_rgb(0,92/255,229/255)
39+
_t = (w-4) * percent
40+
_r = _t if _t < 4 else 4
41+
rounded_rectangle(ctx,x+2,y+2,(w-4) * percent,h-4,_r)
42+
ctx.set_source_rgb(244/255,73/255,202/255)
4143
ctx.fill()
4244

4345
class ProgressBarWindow(yutani.Window):

0 commit comments

Comments
 (0)