From 3c69fb4833194864d3634f802c57fa87db85e7dc Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Tue, 11 Aug 2026 21:03:53 +0900 Subject: [PATCH] Fallback `window_title_frame` to `window_frame` when unspecified (#8400) ### Summary When `title_frame` is not explicitly set, fall back to `window_frame` instead of `Frame::window(&style)`. ### Motivation If a custom `frame` is provided for a window, `window_title_frame` should maintain visual consistency with it by default unless a separate `title_frame` is specified. * Related #8154 * Related #8353 --- 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 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;