Repository navigation
Compute the widget position with signed numbers - #569
Merged
Merged
Conversation
A widget taller than its node made the sum unsigned and gave a position of about two billion pixels. Fixes #189
paceholder
force-pushed
the
fix-widget-position-wrap
branch
from
November 29, 2026 20:04
1a5fbff to
3571de1
Compare
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.
Type of change
Description
widgetPosition()in both default geometries added an unsignedcaptionHeightto the signed node and widget heights. The whole sum was then unsigned. A widget taller than its node gave a negative sum that wrapped around, and the widget was placed about two billion pixels below the node.captionHeightis now anint, like the other heights, so the sum is signed. No casts are needed. The reporter of #189 used five casts for the same effect.When the widget can be taller than its node is a separate question. It is collected in #568.
Testing
y = 2147483474.5).Not tested: the image node of the reporter. The test shows the wrong position, not the painter errors.
Breaking changes?
No.
Related issue
Fixes #189