diff --git a/crates/automation/src/ui/actions/panel.rs b/crates/automation/src/ui/actions/panel.rs index 8429d5025..179ff8a17 100644 --- a/crates/automation/src/ui/actions/panel.rs +++ b/crates/automation/src/ui/actions/panel.rs @@ -60,7 +60,9 @@ impl ActionsSettings { /// The Actions panel's persisted section: Button Mode and the collapsed sets. /// Selection and expansion are not persisted. -#[derive(Clone, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +#[derive( + Clone, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize, craft_ui::contract::MemoProps, craft_ui::contract::PlainData, +)] #[serde(default, rename_all = "camelCase")] #[non_exhaustive] pub struct ActionsSettings { @@ -72,7 +74,7 @@ pub struct ActionsSettings { /// A row of the tree: a set header, an action or one of its steps. Also the selection (one row at /// a time) and the list's key. -#[derive(Clone, Debug, PartialEq, Eq, Hash)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, craft_ui::contract::MemoProps, craft_ui::contract::PlainData)] #[non_exhaustive] pub enum ActionSelection { /// The set header of this name. @@ -89,7 +91,7 @@ pub enum ActionSelection { /// The panel remaps `selected` itself when it reports a [`Reorder`](ActionsEvent::Reorder) /// that moves a row, since it owns the selection. After a [`Delete`](ActionsEvent::Delete) the /// app clears `selected` (the panel cannot tell which rows the delete removed). -#[derive(Clone, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Debug, Default, PartialEq, Eq, craft_ui::contract::MemoProps, craft_ui::contract::PlainData)] #[non_exhaustive] pub struct ActionsPanelState { /// The persisted section. diff --git a/crates/color-ui/src/ui/panel.rs b/crates/color-ui/src/ui/panel.rs index 76c85e775..1326059f6 100644 --- a/crates/color-ui/src/ui/panel.rs +++ b/crates/color-ui/src/ui/panel.rs @@ -62,7 +62,19 @@ craft_ui::words! { /// What the panel shows: Photoshop's panel menu choices, in its order. Hue Cube is the default; /// the theme never changes it. -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)] +#[derive( + Clone, + Copy, + Debug, + Default, + PartialEq, + Eq, + Hash, + serde::Serialize, + serde::Deserialize, + craft_ui::contract::MemoProps, + craft_ui::contract::PlainData, +)] #[serde(rename_all = "camelCase")] #[non_exhaustive] pub enum ColorPanelMode { @@ -129,7 +141,19 @@ impl ColorPanelMode { } /// The ramp under the sliders. Shift-click on the ramp cycles them in this order. -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)] +#[derive( + Clone, + Copy, + Debug, + Default, + PartialEq, + Eq, + Hash, + serde::Serialize, + serde::Deserialize, + craft_ui::contract::MemoProps, + craft_ui::contract::PlainData, +)] #[serde(rename_all = "camelCase")] #[non_exhaustive] pub enum ColorPanelRamp { @@ -179,7 +203,9 @@ impl ColorPanelRamp { } /// The Color panel's settings, kept across runs (settings section `color_panel`). -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +#[derive( + Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize, craft_ui::contract::MemoProps, craft_ui::contract::PlainData, +)] #[serde(default, rename_all = "camelCase")] #[non_exhaustive] pub struct ColorPanelState { diff --git a/crates/imaging/src/ui/histogram/data.rs b/crates/imaging/src/ui/histogram/data.rs index 6588b6aa6..a8521da70 100644 --- a/crates/imaging/src/ui/histogram/data.rs +++ b/crates/imaging/src/ui/histogram/data.rs @@ -207,7 +207,7 @@ impl HistogramData { } /// A range of whole levels (bin positions) a plot has selected, both ends included. -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, craft_ui::contract::MemoProps, craft_ui::contract::PlainData)] #[non_exhaustive] pub struct LevelRange { /// The first level. diff --git a/crates/imaging/src/ui/scopes/panel/settings.rs b/crates/imaging/src/ui/scopes/panel/settings.rs index 6d14f3fb4..a61305622 100644 --- a/crates/imaging/src/ui/scopes/panel/settings.rs +++ b/crates/imaging/src/ui/scopes/panel/settings.rs @@ -4,7 +4,19 @@ use crate::ui::histogram::LevelRange; use crate::ui::scopes::clipping::{ClippingDiagnostic, ClippingMode, ClippingWarnings}; /// The panel's view (its menu's Compact, Expanded and All Channels View). -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)] +#[derive( + Clone, + Copy, + Debug, + Default, + PartialEq, + Eq, + Hash, + serde::Serialize, + serde::Deserialize, + craft_ui::contract::MemoProps, + craft_ui::contract::PlainData, +)] #[serde(rename_all = "camelCase")] #[non_exhaustive] pub enum ScopeView { @@ -20,7 +32,7 @@ pub enum ScopeView { /// The scope panel's persisted section: the app keeps it with its preferences (PhotoCraft's /// `histogramPanel` and `filter.cameraRaw.scope`). Unknown fields are ignored, missing ones take /// their defaults. -#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize, craft_ui::contract::MemoProps, craft_ui::contract::PlainData)] #[serde(default, rename_all = "camelCase")] #[non_exhaustive] pub struct ScopeSettings { @@ -93,7 +105,7 @@ impl ScopeSettings { /// What the panel keeps for the app between passes: the persisted settings and the selected /// level range (not persisted). -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, PartialEq, craft_ui::contract::MemoProps, craft_ui::contract::PlainData)] #[non_exhaustive] pub struct ScopePanelState { /// The persisted section.