diff options
author | 2023-02-17 13:22:45 +0100 | |
---|---|---|
committer | 2023-02-17 13:22:45 +0100 | |
commit | df861d9ece5e8695d05d08f104d37f55222fb363 (patch) | |
tree | 295bc47f05b8230b4530a7be4ecdafd1225ace17 /native | |
parent | 095ecf016b53ad25337663fb9f11a84f373150e0 (diff) | |
download | iced-df861d9ece5e8695d05d08f104d37f55222fb363.tar.gz iced-df861d9ece5e8695d05d08f104d37f55222fb363.tar.bz2 iced-df861d9ece5e8695d05d08f104d37f55222fb363.zip |
Rename `SetAlwaysOnTop` to `ChangeAlwaysOnTop`
Diffstat (limited to 'native')
-rw-r--r-- | native/src/window/action.rs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/native/src/window/action.rs b/native/src/window/action.rs index 0c711090..c6361449 100644 --- a/native/src/window/action.rs +++ b/native/src/window/action.rs @@ -75,7 +75,7 @@ pub enum Action<T> { /// ## Platform-specific /// /// - **Web / Wayland:** Unsupported. - SetAlwaysOnTop(bool), + ChangeAlwaysOnTop(bool), } impl<T> Action<T> { @@ -91,8 +91,8 @@ impl<T> Action<T> { Self::Close => Action::Close, Self::Drag => Action::Drag, Self::Resize { width, height } => Action::Resize { width, height }, - Self::Maximize(bool) => Action::Maximize(bool), - Self::Minimize(bool) => Action::Minimize(bool), + Self::Maximize(maximized) => Action::Maximize(maximized), + Self::Minimize(minimized) => Action::Minimize(minimized), Self::Move { x, y } => Action::Move { x, y }, Self::ChangeMode(mode) => Action::ChangeMode(mode), Self::FetchMode(o) => Action::FetchMode(Box::new(move |s| f(o(s)))), @@ -102,7 +102,9 @@ impl<T> Action<T> { Action::RequestUserAttention(attention_type) } Self::GainFocus => Action::GainFocus, - Self::SetAlwaysOnTop(bool) => Action::SetAlwaysOnTop(bool), + Self::ChangeAlwaysOnTop(on_top) => { + Action::ChangeAlwaysOnTop(on_top) + } } } } @@ -116,8 +118,12 @@ impl<T> fmt::Debug for Action<T> { f, "Action::Resize {{ widget: {width}, height: {height} }}" ), - Self::Maximize(value) => write!(f, "Action::Maximize({value})"), - Self::Minimize(value) => write!(f, "Action::Minimize({value}"), + Self::Maximize(maximized) => { + write!(f, "Action::Maximize({maximized})") + } + Self::Minimize(minimized) => { + write!(f, "Action::Minimize({minimized}") + } Self::Move { x, y } => { write!(f, "Action::Move {{ x: {x}, y: {y} }}") } @@ -129,8 +135,8 @@ impl<T> fmt::Debug for Action<T> { write!(f, "Action::RequestUserAttention") } Self::GainFocus => write!(f, "Action::GainFocus"), - Self::SetAlwaysOnTop(value) => { - write!(f, "Action::AlwaysOnTop({})", value) + Self::ChangeAlwaysOnTop(on_top) => { + write!(f, "Action::AlwaysOnTop({on_top})") } } } |