Skip to content

Conversation

KongJian520
Copy link

@KongJian520 KongJian520 commented Sep 10, 2025

Description

This commit introduces two new properties for the Spinner control: speed and clockwise, allowing developers to customize the behavior of its rotation animation.

Major Changes

  • Added speed: Option<f64> and clockwise: Option<bool> fields to the Spinner structure.
  • Provided chainable speed() and clockwise() methods to facilitate setting these new properties.
  • In the ui method of the Widget implementation, unwrap_or is used to set default values ​​for these two properties to ensure they work correctly even when not explicitly set.
  • Modified the paint_at method signature to directly accept the processed speed and clockwise parameters to simplify the drawing logic.
  • In order to avoid affecting the effect of the original component, I Modify the loading in the image component to Spinner::new().paint_at(ui, rect, 1.0, true);()
  • I have followed the instructions in the PR template

@KongJian520 KongJian520 marked this pull request as ready for review September 10, 2025 12:34
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