From d4e8966aac9347965f8d02310ecf2c9f23bb9bbc Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 28 Jun 2024 18:14:48 +0200 Subject: [PATCH] Ensure `Window` scroll bars are at the window edges (#4733) Set `auto_shrink(false)` on `Window`s `ScrollArea`. This ensures that the scroll bars are always the outermost. * Closes https://github.com/emilk/egui/pull/4602 --- crates/egui/src/containers/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 0c8847ae..15fc8d80 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -59,7 +59,7 @@ impl<'open> Window<'open> { .with_stroke(false) .min_size([96.0, 32.0]) .default_size([340.0, 420.0]), // Default inner size of a window - scroll: ScrollArea::neither(), + scroll: ScrollArea::neither().auto_shrink(false), collapsible: true, default_open: true, with_title_bar: true,