Loading indicator: corrected size calculations and other fixes #2590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
name: Pull Request
about: Create a pull request to help us improve
title: Loading indicator: corrected size calculations and other fixes
assignees: ''
Description:
This PR corrects size/position calculations for the ring-style indicator so that it's properly centered and no longer sticks out of the bounding box. Another change is animation - it used to be jerky at some moments, and is now smooth. Here's an example of what it looks like (old version on the left, corrected on the right):
The PR also adds constants for the
styleargument. Old style values (0 and 1) are still supported, with 1 mapped to the old (broken) rendering that is now deprecated and therefore doesn't have its own constant. In fact, new constants have the values 2 and 3, i.e. do not overlap with the old ones. For compatibility reasons, the default style is still 0, the old "dots" style. The difference between "old dots" and "new dots" is alignment: the new indicator aligns itself to text baseline - it's useful when radius=1 is used (to make indicator the same height as text line).Defaults for indicator colors are no longer hardcoded and are instead taken from Button/ButtonHovered styles, as was intended in the original design.
Also, the indicator does not receive navigation focus anymore (since it's not actionable anyway).
Concerning Areas:
None. Old scripts should continue to work as they were; new users are supposed to specify the style using the new
mvLoadInd_xxxconstants.