diff options
-rw-r--r-- | src/settings.rs | 5 | ||||
-rw-r--r-- | winit/src/application.rs | 1 | ||||
-rw-r--r-- | winit/src/settings.rs | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/settings.rs b/src/settings.rs index 2556c51b..c9ece5ef 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -19,6 +19,9 @@ pub struct Window { /// Whether the window should be resizable or not. pub resizable: bool, + + /// Whether the window should have a border, a title bar, etc. + pub decorations: bool, } impl Default for Window { @@ -26,6 +29,7 @@ impl Default for Window { Window { size: (1024, 768), resizable: true, + decorations: true, } } } @@ -37,6 +41,7 @@ impl From<Settings> for iced_winit::Settings { window: iced_winit::settings::Window { size: settings.window.size, resizable: settings.window.resizable, + decorations: settings.window.decorations, }, } } diff --git a/winit/src/application.rs b/winit/src/application.rs index 1042b412..2a0e56b7 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -105,6 +105,7 @@ pub trait Application: Sized { height: f64::from(height), }) .with_resizable(settings.window.resizable) + .with_decorations(settings.window.decorations) .build(&event_loop) .expect("Open window"); diff --git a/winit/src/settings.rs b/winit/src/settings.rs index d257ecd8..503b9dea 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -17,6 +17,9 @@ pub struct Window { /// Whether the window should be resizable or not. pub resizable: bool, + + /// Whether the window should have a border, a title bar, etc. + pub decorations: bool, } impl Default for Window { @@ -24,6 +27,7 @@ impl Default for Window { Window { size: (1024, 768), resizable: true, + decorations: true, } } } |