-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
DebugUiPlugin doesn't respect scale factor properly #16666
Copy link
Copy link
Closed
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed uponThis work is generally agreed upon
Description
Bevy version
0.15
What you did
Enable DebugUiPlugin's outline drawing.
What went wrong
Outline is twice the size of the actual nodes.
Additional information
This seems to be introduced by #16375, which did not update the debug implementation here:
bevy/crates/bevy_dev_tools/src/ui_debug_overlay/mod.rs
Lines 40 to 48 in 83c7291
| fn new(trans: &GlobalTransform, node: &ComputedNode, scale: f32) -> Self { | |
| let mut this = Self { | |
| pos: trans.translation().xy() * scale, | |
| size: node.size() * scale, | |
| }; | |
| this.pos -= this.size / 2.; | |
| this | |
| } | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed uponThis work is generally agreed upon