summaryrefslogtreecommitdiffstats
path: root/runtime/src/window.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-25 23:18:50 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-25 23:18:50 +0200
commitf0788b9f373f44248e55b068d9d0d494d628ba93 (patch)
tree148279ad6e13e26611f5c5d60e15296474864a71 /runtime/src/window.rs
parenta7fa7e40058188c95a790712e11b863a9f84cecb (diff)
downloadiced-f0788b9f373f44248e55b068d9d0d494d628ba93.tar.gz
iced-f0788b9f373f44248e55b068d9d0d494d628ba93.tar.bz2
iced-f0788b9f373f44248e55b068d9d0d494d628ba93.zip
Replace `change_always_on_top` action with `change_level`
Diffstat (limited to 'runtime/src/window.rs')
-rw-r--r--runtime/src/window.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index 833a1125..d4111293 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -5,7 +5,7 @@ pub use action::Action;
use crate::command::{self, Command};
use crate::core::time::Instant;
-use crate::core::window::{Event, Icon, Mode, UserAttention};
+use crate::core::window::{Event, Icon, Level, Mode, UserAttention};
use crate::futures::subscription::{self, Subscription};
/// Subscribes to the frames of the window of the running application.
@@ -53,7 +53,7 @@ pub fn move_to<Message>(x: i32, y: i32) -> Command<Message> {
Command::single(command::Action::Window(Action::Move { x, y }))
}
-/// Sets the [`Mode`] of the window.
+/// Changes the [`Mode`] of the window.
pub fn change_mode<Message>(mode: Mode) -> Command<Message> {
Command::single(command::Action::Window(Action::ChangeMode(mode)))
}
@@ -99,9 +99,9 @@ pub fn gain_focus<Message>() -> Command<Message> {
Command::single(command::Action::Window(Action::GainFocus))
}
-/// Changes whether or not the window will always be on top of other windows.
-pub fn change_always_on_top<Message>(on_top: bool) -> Command<Message> {
- Command::single(command::Action::Window(Action::ChangeAlwaysOnTop(on_top)))
+/// Changes the window [`Level`].
+pub fn change_level<Message>(level: Level) -> Command<Message> {
+ Command::single(command::Action::Window(Action::ChangeLevel(level)))
}
/// Fetches an identifier unique to the window.