mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
This reverts commit 7b641be7b0.
It accidentally disabled constraining for all windows
This commit is contained in:
@@ -399,11 +399,9 @@ impl<'open> Window<'open> {
|
||||
content_inner
|
||||
};
|
||||
|
||||
if area.movable {
|
||||
area.state_mut().pos = ctx
|
||||
.constrain_window_rect_to_area(area.state().rect(), area.drag_bounds())
|
||||
.min;
|
||||
}
|
||||
area.state_mut().pos = ctx
|
||||
.constrain_window_rect_to_area(area.state().rect(), area.drag_bounds())
|
||||
.min;
|
||||
|
||||
let full_response = area.end(ctx, area_content_ui);
|
||||
|
||||
@@ -510,11 +508,7 @@ fn interact(
|
||||
let new_rect = move_and_resize_window(ctx, &window_interaction)?;
|
||||
let new_rect = ctx.round_rect_to_pixels(new_rect);
|
||||
|
||||
let new_rect = if area.movable {
|
||||
ctx.constrain_window_rect_to_area(new_rect, area.drag_bounds())
|
||||
} else {
|
||||
new_rect
|
||||
};
|
||||
let new_rect = ctx.constrain_window_rect_to_area(new_rect, area.drag_bounds());
|
||||
|
||||
// TODO: add this to a Window state instead as a command "move here next frame"
|
||||
area.state_mut().pos = new_rect.min;
|
||||
|
||||
Reference in New Issue
Block a user