Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate reset and play/pause controls. Disable unavilable controls #17

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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