Skip to content

Tweak Spinner#1825

Open
BrianCraig wants to merge 1 commit into
linebender:mainfrom
BrianCraig:spinner-tweak
Open

Tweak Spinner#1825
BrianCraig wants to merge 1 commit into
linebender:mainfrom
BrianCraig:spinner-tweak

Conversation

@BrianCraig

Copy link
Copy Markdown
Contributor

Hi! This is my first contributtion.

Tweaked Spinner look and feel, to a rolling semi-circle arc, which now uses TrackColor and TrackThickness, and a new AnimationDuration property. Overall:

  • Modified spinner.rs regarding its render and animation, updated current harness tests, added two simple harness tests for thickness and colors, removed edit_spinner test since the Widget always re-render and does not need to check for property changes.
  • Moved TrackColor and TrackThickness property definitions from slider.rs to a new track.rs.
  • Created AnimationDuration property.
  • Updated the gallery example, with tools to check different sizes, thickness, speed and colors.
  • Updated divider_content.png to its new harness result.

One important note is that Spinner stops to use the ContentColor property migrating to TrackColor, this can cause problems since Spinner now does not impl UsesProperty<ContentColor>.

Disclaimer: Gallery Spinner code was partially written with help of AI providing context of another section of the gallery, all other code parts are written by me.

2026-06-15.12-50-04.mp4

Tweaked `Spinner` look and feel, to a rolling semi-circle arc, which now uses `TrackColor` and `TrackThickness`, and a new `AnimationDuration` property.
Overall:
 - Modified `spinner.rs` regarding its render and animation, updated current harness tests, added two simple harness tests for thickness and colors, removed `edit_spinner` test since the Widget always re-render and does not need to check for property changes.
 - Moved `TrackColor` and `TrackThickness` property definitions from `slider.rs` to a new `track.rs`.
 - Created `AnimationDuration` property.
 - Updated the gallery example, with tools to check different sizes, thickness, speed and colors.
 - Updated `divider_content.png` to its new harness result.

One important note is that `Spinner` stops to use the `ContentColor` property migrating to `TrackColor`, this can cause problems since `Spinner` now does not `impl UsesProperty<ContentColor>`.

Disclaimer: Gallery Spinner code was partially written with help of AI providing context of another section of the gallery, all other code parts are written by me.
@PoignardAzur
PoignardAzur self-requested a review June 18, 2026 10:36
@PoignardAzur

Copy link
Copy Markdown
Contributor

Thanks for the PR! I haven't been available lately, but I'll take a look soon.

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