diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 69d3f0bf0..c3f4dcb24 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -627,8 +627,8 @@ impl Window<'_> { let style = ctx.global_style(); // We get or create the Frame for the title and content - let window_title_frame = title_frame.unwrap_or_else(|| Frame::window(&style)); let window_frame = frame.unwrap_or_else(|| Frame::window(&style)); + let window_title_frame = title_frame.unwrap_or(window_frame); // We apply the window margin by using the `ScrollArea::content_margin`. let window_content_margin = window_frame.inner_margin;