Skip to content

Commit d4395c6

Browse files
committed
Hotfix: repair vertical bars not drawing full state but empty state with bar color
1 parent d8df2e0 commit d4395c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/lcd/lcd_comm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,14 @@ def DisplayProgressBar(self, x: int, y: int, width: int, height: int, min_value:
376376

377377
if width > height:
378378
if reverse_direction is True:
379-
x1 = width - bar_filled_width
379+
x1 = width - 1 - bar_filled_width
380380
else:
381381
x2 = bar_filled_width
382382
else:
383383
if reverse_direction is True:
384-
y2 = height - bar_filled_height
384+
y2 = bar_filled_height
385385
else:
386-
y1 = bar_filled_height
386+
y1 = height - 1 - bar_filled_height
387387
draw.rectangle([x1, y1, x2, y2], fill=bar_color, outline=bar_color)
388388

389389
if bar_outline:

0 commit comments

Comments
 (0)