smal fix
This commit is contained in:
parent
ffb6fd0955
commit
7ee49b9cf6
@ -138,13 +138,20 @@ def display_loop(api: Api, cfg: Dict):
|
||||
|
||||
w, h = bg.size
|
||||
w -= 95
|
||||
progress_time = data["progress_ms"] + int(
|
||||
(time.time() - last_api_call) * 1000
|
||||
progress_time = min(
|
||||
data["duration_ms"],
|
||||
data["progress_ms"] + int((time.time() - last_api_call) * 1000),
|
||||
)
|
||||
progress = min(1, progress_time / data["duration_ms"])
|
||||
bar_width = int(w * progress)
|
||||
draw.rectangle(
|
||||
[(7, h - 23), (w + 3, h - 7)],
|
||||
# outline=cfg["color_theme"]["text"],
|
||||
outline=cfg["color_theme"]["bar_outline"],
|
||||
)
|
||||
draw.rectangle(
|
||||
[(8, h - 22), (w + 2, h - 8)],
|
||||
# outline=cfg["color_theme"]["text"],
|
||||
outline=cfg["color_theme"]["bar_outline"],
|
||||
)
|
||||
draw.rectangle(
|
||||
|
Loading…
x
Reference in New Issue
Block a user