ui: fix value text eliding when it fits - #38502
Merged
Merged
Conversation
mpurnell1
force-pushed
the
ui-value-elide-fix
branch
2 times, most recently
from
July 31, 2026 05:41
c9711bc to
37e3f66
Compare
Contributor
Process replay diff reportReplays driving segments through this PR and compares the behavior to master. ✅ 0 changed, 66 passed, 0 errors |
mpurnell1
force-pushed
the
ui-value-elide-fix
branch
2 times, most recently
from
July 31, 2026 06:24
51750f1 to
15667b5
Compare
mpurnell1
marked this pull request as ready for review
July 31, 2026 07:15
ButtonAction sizes the value label rect to exactly fit the measured text, but the width gets rounded when stored as float32 in rl.Rectangle. When it rounds down, the label comes out a fraction of a pixel too narrow and gui_label cuts a whole character, rendering "downloading..." as "downloadin..." and a "nightly" target branch as "nightl...".
mpurnell1
force-pushed
the
ui-value-elide-fix
branch
from
August 3, 2026 04:26
5e21352 to
4bd500c
Compare
This reverts commit 5bb6a54.
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.
Note
This branch temporarily includes the CI fix from #38514 so the
Create UI Reportjob can run on fork PRsDescription
While checking for updates on my comma, I noticed the software panel showed
checkin...instead ofchecking.... The last character is being eaten bygui_label's eliding:ButtonAction.get_width_hint()sizes the value label to exactly fit the measured text, and that width gets rounded when stored as float32 inrl.Rectangle. When it rounds down, the label rect comes out a fraction of a pixel too narrow, so the elide logic chops a whole character and appends....Whether a given string trips this depends on its exact measured width. On current master,
checking...happens to survive the rounding, butdownloading...renders asdownloadin...and a target branch ofnightlyrenders asnightl.... Rounding the width hint up to a whole pixel makes it exactly representable in float32, so the label rect can never come out narrower than the text it was sized for.The first commit adds the updater
checking...anddownloading...states to the UI replay script, so they are covered by the UI report and thedownloading...case will catch a regression here.Verification

Software panel while the updater is downloading, before (frame from the UI report artifact):
after:
