From df861d9ece5e8695d05d08f104d37f55222fb363 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 17 Feb 2023 13:22:45 +0100 Subject: Rename `SetAlwaysOnTop` to `ChangeAlwaysOnTop` --- native/src/window/action.rs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'native/src/window/action.rs') 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 { /// ## Platform-specific /// /// - **Web / Wayland:** Unsupported. - SetAlwaysOnTop(bool), + ChangeAlwaysOnTop(bool), } impl Action { @@ -91,8 +91,8 @@ impl Action { 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 Action { 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 fmt::Debug for Action { 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 fmt::Debug for Action { 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})") } } } -- cgit