diff options
author | 2022-12-14 03:00:47 +0100 | |
---|---|---|
committer | 2022-12-14 03:00:47 +0100 | |
commit | b01be6b9321d26c167362f4515d3c895a081ba58 (patch) | |
tree | 43035ccfd21056d89ba7f3325eeffc3cc77ec7c1 /native | |
parent | 02182eea45537c9eb5b2bddfdff822bb8a3d143d (diff) | |
parent | cfcf2017e551beee8503081a48a9c0ce3905a443 (diff) | |
download | iced-b01be6b9321d26c167362f4515d3c895a081ba58.tar.gz iced-b01be6b9321d26c167362f4515d3c895a081ba58.tar.bz2 iced-b01be6b9321d26c167362f4515d3c895a081ba58.zip |
Merge pull request #1588 from Night-Hunter-NF/ToggleDecorations
add toggle decorations action
Diffstat (limited to '')
-rw-r--r-- | native/src/window/action.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/native/src/window/action.rs b/native/src/window/action.rs index 009dcc27..283775ba 100644 --- a/native/src/window/action.rs +++ b/native/src/window/action.rs @@ -35,6 +35,11 @@ pub enum Action<T> { SetMode(Mode), /// Sets the window to maximized or back ToggleMaximize, + /// Toggles whether window has decorations + /// ## Platform-specific + /// - **X11:** Not implemented. + /// - **Web:** Unsupported. + ToggleDecorations, /// Fetch the current [`Mode`] of the window. FetchMode(Box<dyn FnOnce(Mode) -> T + 'static>), } @@ -56,6 +61,7 @@ impl<T> Action<T> { Self::Move { x, y } => Action::Move { x, y }, Self::SetMode(mode) => Action::SetMode(mode), Self::ToggleMaximize => Action::ToggleMaximize, + Self::ToggleDecorations => Action::ToggleDecorations, Self::FetchMode(o) => Action::FetchMode(Box::new(move |s| f(o(s)))), } } @@ -77,6 +83,7 @@ impl<T> fmt::Debug for Action<T> { } Self::SetMode(mode) => write!(f, "Action::SetMode({:?})", mode), Self::ToggleMaximize => write!(f, "Action::ToggleMaximize"), + Self::ToggleDecorations => write!(f, "Action::ToggleDecorations"), Self::FetchMode(_) => write!(f, "Action::FetchMode"), } } |