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
6 changes: 4 additions & 2 deletions crates/bevy_ui/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,11 @@ pub fn prepare_uinodes(
positions[3] + positions_diff[3].extend(0.),
];

let transformed_rect_size = extracted_uinode.transform.transform_vector3(rect_size);

// Cull nodes that are completely clipped
if positions_diff[0].x - positions_diff[1].x >= rect_size.x
|| positions_diff[1].y - positions_diff[2].y >= rect_size.y
if positions_diff[0].x - positions_diff[1].x >= transformed_rect_size.x
|| positions_diff[1].y - positions_diff[2].y >= transformed_rect_size.y
{
continue;
}
Expand Down