Skip to content

Commit 4f28bc1

Browse files
committed
Fixed resolve_clip_rect, Rect::from_center_size takes a size, not a half_size.
1 parent 04933ec commit 4f28bc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_ui/src/ui_node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl ComputedNode {
268268
overflow: Overflow,
269269
overflow_clip_margin: OverflowClipMargin,
270270
) -> Rect {
271-
let mut clip_rect = Rect::from_center_size(Vec2::ZERO, 0.5 * self.size);
271+
let mut clip_rect = Rect::from_center_size(Vec2::ZERO, self.size);
272272

273273
let clip_inset = match overflow_clip_margin.visual_box {
274274
OverflowClipBox::BorderBox => BorderRect::ZERO,

0 commit comments

Comments
 (0)