Skip to content

Commit

Permalink
separate reset and play/pause controls. Disable unavilable controls
Browse files Browse the repository at this point in the history
  • Loading branch information
Corvince committed Dec 27, 2023
1 parent 975bb08 commit b475a9c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mesa_interactive/timeline_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ def handle_click_start_stop():
solara.Button(
icon_name="mdi-skip-backward",
color="primary",
disabled=playing.value,
disabled=playing.value or current_step == 0,
on_click=change_step(0),
style={"margin-left": "20px"},
)
with solara.Tooltip("Step backward"):
solara.Button(
icon_name="mdi-step-backward",
color="primary",
disabled=playing.value,
disabled=playing.value or current_step == 0,
on_click=change_step(current_step - 1),
)
with solara.Tooltip("Step forward"):
Expand All @@ -71,7 +72,7 @@ def handle_click_start_stop():
solara.Button(
icon_name="mdi-skip-forward",
color="primary",
disabled=playing.value,
disabled=playing.value or current_step == max_step,
on_click=change_step(max_step),
)
solara.SliderInt(
Expand Down

0 comments on commit b475a9c

Please sign in to comment.