Skip to content

Conversation

@bradysimon
Copy link

Overview

This PR uses the new animation API to animate the radio widget. The current animation scales/fades the dot icon as the is_selected state changes.

This also gates the animation behind a new animations feature that Hector specified and adds an optional animations feature to the scrollable example to demonstrate this change. To test this change locally:

  • with animations: cargo run -p scrollable --features animations
  • without animations: cargo run -p scrollable

Preview

Here's what the animation looks like (in light mode since the radio in dark mode isn't as clear):

animated-radio.mov

Side note: Hector mentioned on Discord to avoid animating more complex types like colors/backgrounds, so this PR doesn't add any general Style animation. Only f32/bool animations for now.

@bradysimon
Copy link
Author

An alternative animation would be to make the dot scale from a size of zero to its final size. I think I prefer the current animation but I want to at least present both options:

animated-radio-alt.mov

@bradysimon bradysimon force-pushed the feature/animated-radio branch from b4aaca0 to 4d8ecb6 Compare May 4, 2025 20:19
@hecrj hecrj modified the milestones: 0.14, 1.0 Nov 20, 2025
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.

2 participants