Skip to content

Commit

Permalink
Merge pull request #17 from Corvince/feat/button-layout
Browse files Browse the repository at this point in the history
separate reset and play/pause controls. Disable unavilable controls
  • Loading branch information
Corvince authored Dec 27, 2023
2 parents 975bb08 + 62f4053 commit bf47215
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": "2rem"},
)
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 bf47215

Please sign in to comment.