Skip to content

Change Spinner widget to account for width as well as height#7560

Merged
lucasmerlin merged 1 commit intoemilk:mainfrom
bryceberger:bryce/push-qvqqpkrookyv
Oct 9, 2025
Merged

Change Spinner widget to account for width as well as height#7560
lucasmerlin merged 1 commit intoemilk:mainfrom
bryceberger:bryce/push-qvqqpkrookyv

Conversation

@bryceberger
Copy link
Copy Markdown
Contributor

Previously, when rect was taller than it was wide, the spinner would render far outside the given rectangle. Now, it always renders inside the smaller of the two dimensions.

I noticed this when upgrading from 0.30 to 0.32. I have an image that's significantly taller than it is wide. In 0.32, when the image is loading, it shows the spinner. Since the spinner radius is determined solely based on rectangle height, the spinner ends up far too wide and covers other elements.

  • I have followed the instructions in the PR template

Previously, when `rect` was taller than it was wide, the spinner would
render far outside the given rectangle. Now, it always renders inside
the smaller of the two dimensions.
@github-actions
Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/7560-brycepush-qvqqpkrookyv
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@bryceberger
Copy link
Copy Markdown
Contributor Author

Poking this --- only CI failure is the PR not being labelled, and I seem to be unable to label the PR.

@lucasmerlin lucasmerlin added bug Something is broken egui labels Sep 30, 2025
Copy link
Copy Markdown
Collaborator

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@lucasmerlin lucasmerlin merged commit 0abecce into emilk:main Oct 9, 2025
27 of 28 checks passed
@bryceberger bryceberger deleted the bryce/push-qvqqpkrookyv branch October 9, 2025 17:50
Masterchef365 pushed a commit to Masterchef365/egui that referenced this pull request Apr 3, 2026
)

Previously, when `rect` was taller than it was wide, the spinner would
render far outside the given rectangle. Now, it always renders inside
the smaller of the two dimensions.

I noticed this when upgrading from 0.30 to 0.32. I have an image that's
significantly taller than it is wide. In 0.32, when the image is
loading, it shows the spinner. Since the spinner radius is determined
solely based on rectangle height, the spinner ends up far too wide and
covers other elements.

* [x] I have followed the instructions in the PR template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants