Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Overflow::Hidden doesn't work correctly with scale_factor_override #3854

Closed
wants to merge 7 commits into from
5 changes: 3 additions & 2 deletions crates/bevy_ui/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,9 @@ pub fn prepare_uinodes(
positions[3] + positions_diff[3].extend(0.),
];

let rect_size_v4 = uinode_rect.size().extend(0.).extend(0.);
let transformed_rect_size = (extracted_uinode.transform * rect_size_v4).xy().extend(1.);

let transformed_rect_size =
(extracted_uinode.transform * uinode_rect.size().extend(0.).extend(0.)).xy();
ickshonpe marked this conversation as resolved.
Show resolved Hide resolved

// Cull nodes that are completely clipped
if positions_diff[0].x - positions_diff[1].x >= transformed_rect_size.x
Expand Down