Removed empty progress-bars.
This commit is contained in:
parent
22894b01c9
commit
f64384ee92
1 changed files with 30 additions and 26 deletions
|
@ -134,7 +134,10 @@ def layer(win, call):
|
|||
|
||||
passed = time.time() - win.render_runtime.get("started_rendering", 0)
|
||||
passed = passed*1000000
|
||||
if win.render_runtime.get("to_render"):
|
||||
longest = passed
|
||||
else:
|
||||
longest = 0
|
||||
|
||||
|
||||
|
||||
|
@ -156,13 +159,13 @@ def layer(win, call):
|
|||
frame_h = 0
|
||||
|
||||
|
||||
if win.render_runtime.get("current_frame", 0) == frame:
|
||||
if win.render_runtime.get("current_frame", 0) == frame and win.render_runtime.get("to_render"):
|
||||
frame_h = (win.current["h"]-200)/3 * (passed / longest)
|
||||
|
||||
frame_h = max(frame_h, frame_w)
|
||||
|
||||
UI_color.set(layer, win, "node_background")
|
||||
if win.render_runtime.get("current_frame", 0) == frame:
|
||||
if win.render_runtime.get("current_frame", 0) == frame and win.render_runtime.get("to_render"):
|
||||
UI_color.set(layer, win, "progress_active")
|
||||
UI_elements.roundrect(layer, win,
|
||||
580+(n*frame_w),
|
||||
|
@ -188,7 +191,7 @@ def layer(win, call):
|
|||
break
|
||||
|
||||
|
||||
|
||||
if win.render_runtime.get("to_render"):
|
||||
UI_color.set(layer, win, "text_normal")
|
||||
layer.set_font_size(20)
|
||||
layer.move_to(50,
|
||||
|
@ -495,8 +498,9 @@ def layer(win, call):
|
|||
fraction = (win.renders[render]["current_frame"] - win.renders[render]["start_frame"])\
|
||||
/ (win.renders[render]["end_frame"] - win.renders[render]["start_frame"])
|
||||
|
||||
fraction = min(1, fraction)
|
||||
fraction = max(0,min(1, fraction))
|
||||
|
||||
if fraction:
|
||||
UI_color.set(layer, win, "progress_background")
|
||||
UI_elements.roundrect(layer, win,
|
||||
x+20,
|
||||
|
|
Loading…
Reference in a new issue