From a25633785699051e509edb8116da4e72350ed001 Mon Sep 17 00:00:00 2001 From: Vladislav Izbash <48411180+VladislavIzbash@users.noreply.github.com> Date: Wed, 25 Aug 2021 19:20:53 +0300 Subject: [PATCH] Add maximized property to NativeOptions (#649) --- egui_glium/src/backend.rs | 1 + epi/src/lib.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/egui_glium/src/backend.rs b/egui_glium/src/backend.rs index d7412fd8..243c1825 100644 --- a/egui_glium/src/backend.rs +++ b/egui_glium/src/backend.rs @@ -83,6 +83,7 @@ fn create_display( ) -> glium::Display { let mut window_builder = glutin::window::WindowBuilder::new() .with_always_on_top(native_options.always_on_top) + .with_maximized(native_options.maximized) .with_decorations(native_options.decorated) .with_resizable(native_options.resizable) .with_title(app.name()) diff --git a/epi/src/lib.rs b/epi/src/lib.rs index 3ad85d37..7c718332 100644 --- a/epi/src/lib.rs +++ b/epi/src/lib.rs @@ -163,6 +163,9 @@ pub struct NativeOptions { /// Sets whether or not the window will always be on top of other windows. pub always_on_top: bool, + /// Show window in maximized mode + pub maximized: bool, + /// On desktop: add window decorations (i.e. a frame around your app)? /// If false it will be difficult to move and resize the app. pub decorated: bool, @@ -191,6 +194,7 @@ impl Default for NativeOptions { fn default() -> Self { Self { always_on_top: false, + maximized: false, decorated: true, drag_and_drop_support: false, icon_data: None,