From 13c649881edfda9ab0215c7353a5236e07ef749d Mon Sep 17 00:00:00 2001 From: bbb651 Date: Fri, 4 Oct 2024 21:14:06 +0300 Subject: Add `window::Settings::maximized` Corresponds to `winit::window::WindowAttributes::with_maximized` --- core/src/window/settings.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/src/window') diff --git a/core/src/window/settings.rs b/core/src/window/settings.rs index fbbf86ab..13822e82 100644 --- a/core/src/window/settings.rs +++ b/core/src/window/settings.rs @@ -34,6 +34,9 @@ pub struct Settings { /// The initial logical dimensions of the window. pub size: Size, + /// Whether the window should start maximized. + pub maximized: bool, + /// The initial position of the window. pub position: Position, @@ -79,6 +82,7 @@ impl Default for Settings { fn default() -> Self { Self { size: Size::new(1024.0, 768.0), + maximized: false, position: Position::default(), min_size: None, max_size: None, -- cgit From dd08f98f0ebb6fb59801bfa030a56267e45a509b Mon Sep 17 00:00:00 2001 From: bbb651 Date: Fri, 4 Oct 2024 21:20:43 +0300 Subject: Add `window::Settings::fullscreen` Corresponds to `winit::window::WindowAttributes::with_fullscreen`. Currently only allows to set `Fullscreen::Borderless(None)` meaning borderless on the current monitor, exclusive fullscreen does not make sense for a GUI and iced does not expose monitors yet. --- core/src/window/settings.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/src/window') diff --git a/core/src/window/settings.rs b/core/src/window/settings.rs index 13822e82..e87fcc83 100644 --- a/core/src/window/settings.rs +++ b/core/src/window/settings.rs @@ -37,6 +37,9 @@ pub struct Settings { /// Whether the window should start maximized. pub maximized: bool, + /// Whether the window should start fullscreen. + pub fullscreen: bool, + /// The initial position of the window. pub position: Position, @@ -83,6 +86,7 @@ impl Default for Settings { Self { size: Size::new(1024.0, 768.0), maximized: false, + fullscreen: false, position: Position::default(), min_size: None, max_size: None, -- cgit