[MU4] fix #9356: Set the correct magnification on icons in custom palettes #11102
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.
Resolves: #9356
In the "Palettes" sidebar, some icons are zoomed in or out to make them more legible. (For example, clefs are shown at 0.8x magnification; fingering indicators are shown at 1.5x magnification.)
Previously, items in custom palettes were not being scaled. As a result, clefs in custom palettes looked very large, and fingering indicators in custom palettes looked very small.
This PR fixes that behavior; now, when an item is added to any palette, it is given a magnification value according to what type of element it is.
Caveats:
You may need to click the "reset palette" button in order for these changes to take effect.
Some elements—in particular, action icons—still appear slightly too large in custom palettes, for reasons I don't entirely understand.[Fixed]Some palettes have cells with varying magnifications. Previously, the logic to accomplish this was spread between
palettecreator.cpp
andpalette.cpp
. I've consolidated this logic inpalette.cpp
in thescaleCell()
method.Previously, some tempo text icons were displayed at 0.975x scale, and others were displayed at 0.845x scale. To keep the logic in
scaleCell()
simple, I split the difference and set them both to 0.9x scale.