Repository navigation
Fit the slider value box to its text instead of a fixed 50px - #127
Merged
Merged
Conversation
DrawRangeField drew the number box and the percent label with GUILayout.Width(50), so with a bigger font (4K, custom skin) the value was clipped ("-0.", "0.(") and "100%" wrapped to a second line. The width now fits the longest of the value, the minimum and the maximum in the current style (plus its margin), measured on a sample of zeros so the box does not jump while the slider is dragged, and is never narrower than the old 50.
ManlyMarco
reviewed
Oct 11, 2026
Per review: every value box and percent label next to a slider now uses one global width, so they stand in one column. It only grows: a value that needs more room bumps it for all of them, up to 10 characters, and it never goes below the old 50. It is reset in ClearCache, when the window opens or closes, so a font or skin change is picked up on the next open.
ManlyMarco
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DrawRangeFielddraws the number box next to a slider, and the percent label, with a fixedGUILayout.Width(50). With a bigger font (a 4K screen, or a custom skin throughWindowSkin) the value gets clipped (-0.,0.() and100%wraps to a second line.The width now fits the text in the current style, and one width is shared by all of them so they line up (per review):
100%still wrapped);Tested in a Unity 2020.3 game: at 3840×2160 with a large font
480.0,2.0,0.7fit whole and100%,25%stay on one line; at 1280×720 all value boxes and percent labels stand in one column of the same width.This is the last one from me, thank you again!