mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user