1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Hide close-button for child viewports by default

This commit is contained in:
Emil Ernerfeldt
2023-11-06 10:51:56 +01:00
parent 4cad978f80
commit 39f13b4551
3 changed files with 28 additions and 12 deletions

View File

@@ -87,8 +87,9 @@ pub fn window_builder<E>(
..
} = native_options;
let mut window_builder = egui::ViewportBuilder::new("")
let mut window_builder = egui::ViewportBuilder::new(ViewportId::MAIN)
.with_title(title)
.with_close_button(true) // The default for all other viewports is `false`!
.with_decorations(*decorated)
.with_fullscreen(*fullscreen)
.with_maximized(*maximized)