summaryrefslogtreecommitdiffstats
path: root/src/window
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-08-18 15:03:56 +0200
committerLibravatar GitHub <noreply@github.com>2022-08-18 15:03:56 +0200
commitda7e8598406fcde2a33ea749d561a2f10dbb5407 (patch)
tree489f7cfbb134b8736290f30010fe680a31c90423 /src/window
parent07cbed106467097543ff33d3b34e0e1ca6f695ae (diff)
parent11f5527d7645619f49b030e30485f24ac637efbd (diff)
downloadiced-da7e8598406fcde2a33ea749d561a2f10dbb5407.tar.gz
iced-da7e8598406fcde2a33ea749d561a2f10dbb5407.tar.bz2
iced-da7e8598406fcde2a33ea749d561a2f10dbb5407.zip
Merge pull request #1389 from iced-rs/refactor-window-mode
Replace `window::Mode` with window commands
Diffstat (limited to '')
-rw-r--r--native/src/window/mode.rs (renamed from src/window/mode.rs)0
-rw-r--r--src/window.rs2
-rw-r--r--src/window/settings.rs5
3 files changed, 5 insertions, 2 deletions
diff --git a/src/window/mode.rs b/native/src/window/mode.rs
index fdce8e23..fdce8e23 100644
--- a/src/window/mode.rs
+++ b/native/src/window/mode.rs
diff --git a/src/window.rs b/src/window.rs
index 71158816..eb5e17a6 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -1,12 +1,10 @@
//! Configure the window of your application in native platforms.
-mod mode;
mod position;
mod settings;
pub mod icon;
pub use icon::Icon;
-pub use mode::Mode;
pub use position::Position;
pub use settings::Settings;
diff --git a/src/window/settings.rs b/src/window/settings.rs
index 8e32f4fb..24d0f4f9 100644
--- a/src/window/settings.rs
+++ b/src/window/settings.rs
@@ -15,6 +15,9 @@ pub struct Settings {
/// The maximum size of the window.
pub max_size: Option<(u32, u32)>,
+ /// Whether the window should be visible or not.
+ pub visible: bool,
+
/// Whether the window should be resizable or not.
pub resizable: bool,
@@ -38,6 +41,7 @@ impl Default for Settings {
position: Position::default(),
min_size: None,
max_size: None,
+ visible: true,
resizable: true,
decorations: true,
transparent: false,
@@ -54,6 +58,7 @@ impl From<Settings> for iced_winit::settings::Window {
position: iced_winit::Position::from(settings.position),
min_size: settings.min_size,
max_size: settings.max_size,
+ visible: settings.visible,
resizable: settings.resizable,
decorations: settings.decorations,
transparent: settings.transparent,