bevy_ui_debug scrollbars inset fix
#22343
Open
+16
−40
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.
Objective
ComputedNode'scontent_insetfield was changed to allocate space for the scrollbars between the content and padding areas. The UI debug overlay expects thecontent_insetsto include that space and as a result wrongly draws the scrollbars inset into the content box by their width.Solution
Use
ComputedNode'shorizontal_scrollbarandvertical_scrollbarmethods to position the debug overlay's scroll bar rects instead.Testing
On main you should see a gap between the the vertical scrollbar and the right edge of the node.
With this PR, the gap should be gone.