diff --git a/crates/domain/src/value_objects/anchor_strategy.rs b/crates/domain/src/value_objects/anchor_strategy.rs index cd1b4b6..1205cb5 100644 --- a/crates/domain/src/value_objects/anchor_strategy.rs +++ b/crates/domain/src/value_objects/anchor_strategy.rs @@ -1,7 +1,8 @@ /// Strategy for calculating popup position relative to an anchor rectangle -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] pub enum AnchorStrategy { /// Center popup horizontally below the anchor + #[default] CenterBottom, /// Center popup horizontally above the anchor CenterTop, @@ -49,9 +50,3 @@ impl AnchorStrategy { } } } - -impl Default for AnchorStrategy { - fn default() -> Self { - Self::CenterBottom - } -} diff --git a/crates/domain/src/value_objects/keyboard_interactivity.rs b/crates/domain/src/value_objects/keyboard_interactivity.rs index e8d867d..4033091 100644 --- a/crates/domain/src/value_objects/keyboard_interactivity.rs +++ b/crates/domain/src/value_objects/keyboard_interactivity.rs @@ -1,16 +1,11 @@ /// Controls how a surface receives keyboard input -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum KeyboardInteractivity { /// Surface does not receive keyboard events None, /// Surface always receives keyboard focus Exclusive, /// Surface receives focus when clicked (default) + #[default] OnDemand, } - -impl Default for KeyboardInteractivity { - fn default() -> Self { - Self::OnDemand - } -} diff --git a/crates/domain/src/value_objects/layer.rs b/crates/domain/src/value_objects/layer.rs index 980bd00..11e3b3d 100644 --- a/crates/domain/src/value_objects/layer.rs +++ b/crates/domain/src/value_objects/layer.rs @@ -2,20 +2,15 @@ /// /// Determines which layer a surface appears in, affecting visibility and stacking order. /// Defaults to `Top` for typical panels and bars. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum Layer { /// Lowest layer, typically for wallpapers Background, /// Below normal windows Bottom, /// Above normal windows, default for bars/panels + #[default] Top, /// Highest layer, above all other content Overlay, } - -impl Default for Layer { - fn default() -> Self { - Self::Top - } -} diff --git a/crates/domain/src/value_objects/output_policy.rs b/crates/domain/src/value_objects/output_policy.rs index 04f8205..e2f2f91 100644 --- a/crates/domain/src/value_objects/output_policy.rs +++ b/crates/domain/src/value_objects/output_policy.rs @@ -5,9 +5,10 @@ use std::rc::Rc; type OutputFilter = Rc bool>; /// Determines which outputs (monitors) should display the surface -#[derive(Clone)] +#[derive(Clone, Default)] pub enum OutputPolicy { /// Display surface on all connected outputs (default) + #[default] AllOutputs, /// Display surface only on the primary output PrimaryOnly, @@ -40,12 +41,6 @@ impl OutputPolicy { } } -impl Default for OutputPolicy { - fn default() -> Self { - Self::AllOutputs - } -} - impl fmt::Debug for OutputPolicy { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { diff --git a/crates/domain/src/value_objects/popup_positioning_mode.rs b/crates/domain/src/value_objects/popup_positioning_mode.rs index da8de18..aa3487e 100644 --- a/crates/domain/src/value_objects/popup_positioning_mode.rs +++ b/crates/domain/src/value_objects/popup_positioning_mode.rs @@ -1,9 +1,10 @@ /// Alignment mode for popup positioning /// /// Determines how a popup is aligned relative to its placement point. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] pub enum PopupPositioningMode { /// Align popup's top-left corner to placement point + #[default] TopLeft, /// Center popup horizontally at placement point, top edge aligned TopCenter, @@ -44,9 +45,3 @@ impl PopupPositioningMode { } } } - -impl Default for PopupPositioningMode { - fn default() -> Self { - Self::TopLeft - } -}