From a7fa7e40058188c95a790712e11b863a9f84cecb Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 25 May 2023 23:14:07 +0200 Subject: Introduce `window::Level` enum ... and add `level` field to `window::Settings` --- src/window/settings.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/window/settings.rs b/src/window/settings.rs index 3c8da62f..458b9232 100644 --- a/src/window/settings.rs +++ b/src/window/settings.rs @@ -1,4 +1,4 @@ -use crate::window::{Icon, Position}; +use crate::window::{Icon, Level, Position}; pub use iced_winit::settings::PlatformSpecific; @@ -29,8 +29,8 @@ pub struct Settings { /// Whether the window should be transparent. pub transparent: bool, - /// Whether the window will always be on top of other windows. - pub always_on_top: bool, + /// The window [`Level`]. + pub level: Level, /// The icon of the window. pub icon: Option, @@ -50,7 +50,7 @@ impl Default for Settings { resizable: true, decorations: true, transparent: false, - always_on_top: false, + level: Level::default(), icon: None, platform_specific: Default::default(), } @@ -68,7 +68,7 @@ impl From for iced_winit::settings::Window { resizable: settings.resizable, decorations: settings.decorations, transparent: settings.transparent, - always_on_top: settings.always_on_top, + level: settings.level, icon: settings.icon.map(Icon::into), platform_specific: settings.platform_specific, } -- cgit