Skip to content

Keep the toolbar enabled while cards animate - #5

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/toolbar-blink
Nov 7, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/toolbar-blink

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Contributor

Fixes the toolbar blinking on every click.

Each move disabled New game, Restart, Undo, Hint, Auto move and Draw for the length of its card animation (set_is_enabled(!busy) in CasinoView). The Button.casino:disabled style dims a button to 45% opacity, so the whole toolbar flashed dark on each stock click or card move.

Every one of those actions already returns early while input is blocked (input_blocked(), which covers animations and dialogs), so disabling the buttons added nothing. The buttons now stay enabled, and Undo is still enabled only when there is a move to undo.

Tested locally: cargo test --workspace passes.

Every move disabled New game, Restart, Undo, Hint, Auto move and Draw for
the length of its animation, and the disabled style dims a casino button
to 45 % opacity, so the whole toolbar blinked on each click. The actions
already return early while input is blocked (input_blocked), so the
buttons stay enabled; Undo still follows whether there is a move to undo.
@wieslawsoltes
wieslawsoltes merged commit b58bb85 into main Nov 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant