mirror of
https://github.com/storytold/craft-libs.git
synced 2026-12-01 02:36:54 +01:00
The tool options' types are PlainData (FW-365 F6b)
This commit is contained in:
1 parent
c73a94fa20
commit
b402ab7455
9 files changed
+20
-20
No files matched your search
@@ -544,7 +544,7 @@ const INV_PHI: f64 = 0.618_033_988_749_894_9;
|
||||
const PHI: f64 = 1.0 + INV_PHI;
|
||||
|
||||
/// The composition guide drawn inside a crop frame, in Photoshop's menu order.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize, craft_ui_macros::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum CropGuide {
|
||||
@@ -727,7 +727,7 @@ fn golden_spiral() -> Vec<[f64; 2]> {
|
||||
}
|
||||
|
||||
/// When the guide shows.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize, craft_ui_macros::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum GuideShow {
|
||||
|
||||
@@ -61,7 +61,7 @@ craft_ui::words! {
|
||||
}
|
||||
|
||||
/// How many pixels around the pointer the eyedropper averages: Photoshop's Sample Size list.
|
||||
#[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::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum SampleSize {
|
||||
@@ -115,7 +115,7 @@ impl SampleSize {
|
||||
}
|
||||
|
||||
/// Which layers the eyedropper reads: Photoshop's Sample list.
|
||||
#[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::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum SampleSource {
|
||||
@@ -172,7 +172,7 @@ impl SampleSource {
|
||||
}
|
||||
|
||||
/// The Eyedropper's options bar values.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub struct EyedropperOptions {
|
||||
|
||||
@@ -24,7 +24,7 @@ pub const FIELD_MAX: f64 = 1e9;
|
||||
pub const LENGTH_MIN: f64 = 0.01;
|
||||
|
||||
/// What the frame's proportions follow.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum CropRatio {
|
||||
@@ -55,7 +55,7 @@ impl CropRatio {
|
||||
}
|
||||
|
||||
/// The resolution field's unit.
|
||||
#[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::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum ResolutionUnit {
|
||||
@@ -68,7 +68,7 @@ pub enum ResolutionUnit {
|
||||
|
||||
/// A length with the unit it was entered in: the W and H of W × H × Resolution mode keep what the user typed ("2 in"
|
||||
/// stays in inches when the document resizes).
|
||||
#[derive(Clone, Copy, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, serde::Serialize, serde::Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub struct CropLength {
|
||||
@@ -97,7 +97,7 @@ impl CropLength {
|
||||
|
||||
/// The W, H and Resolution fields of W × H × Resolution mode. Unset W and H are `None`; the resolution is typed text
|
||||
/// ("300"), empty when unset. Perspective Crop's options bar uses the same fields.
|
||||
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub struct CropSizeFields {
|
||||
@@ -112,7 +112,7 @@ pub struct CropSizeFields {
|
||||
}
|
||||
|
||||
/// What the area a turned or extending crop uncovers is filled with.
|
||||
#[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::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum CropFill {
|
||||
@@ -229,7 +229,7 @@ pub const CROP_SIZES: [CropSizePreset; 8] = [
|
||||
/// options bar edits it in place, the tool reads it each pass and reports key changes (O, ⇧O, H,
|
||||
/// P, I, X) as [`CropEvent::Settings`](super::CropEvent::Settings). Every field defaults on its
|
||||
/// own, so older settings load.
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub struct CropSettings {
|
||||
|
||||
@@ -38,7 +38,7 @@ pub const PATH_OPTIONS_COLOR_KEY: &str = "pathOptions.color";
|
||||
|
||||
/// The pen's Path Options, persisted by the app with its preferences (Photoshop's Pen gear popover). Serialised in
|
||||
/// camelCase; unknown fields are ignored and missing ones take their defaults.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub struct PathOptionsSettings {
|
||||
@@ -58,7 +58,7 @@ pub struct PathOptionsSettings {
|
||||
}
|
||||
|
||||
/// How the direction handles' ends are drawn.
|
||||
#[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::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum HandleStyle {
|
||||
|
||||
@@ -29,7 +29,7 @@ pub use stroke_cells::{StrokeCells, StrokeCellsOutput};
|
||||
pub use words::ShapeWords;
|
||||
|
||||
/// The drawing mode of the vector tools.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum VectorMode {
|
||||
|
||||
@@ -49,7 +49,7 @@ impl TransformPreset {
|
||||
|
||||
/// How the transform resamples the moving pixels: PhotoCraft's three choices (LC11). The app maps
|
||||
/// them to its engine; [`id`](Self::id) gives PhotoCraft's ids.
|
||||
#[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::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum Interpolation {
|
||||
@@ -100,7 +100,7 @@ pub enum TransformChoice {
|
||||
|
||||
/// Free Transform's persisted section: the app keeps it with its preferences. 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::PlainData)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub struct TransformSettings {
|
||||
|
||||
@@ -44,7 +44,7 @@ pub trait EdgeTracer {
|
||||
/// The Magnetic Lasso's options bar, persisted by the app (decisions §2.4). The options bar edits
|
||||
/// [`MagneticLassoTool::settings_mut`]; `[` and `]` change `width` ([`step_width`](Self::step_width)): the tool while an
|
||||
/// outline is open, the app's shortcuts otherwise.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize, craft_ui::contract::PlainData)]
|
||||
#[serde(rename_all = "camelCase", default)]
|
||||
#[non_exhaustive]
|
||||
pub struct MagneticSettings {
|
||||
|
||||
@@ -13,7 +13,7 @@ const SHIELD_OPACITY: f32 = 75.0;
|
||||
const SHIELD_EDITING: f32 = 0.5;
|
||||
|
||||
/// The shield's colour.
|
||||
#[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_macros::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum ShieldColor {
|
||||
@@ -25,7 +25,7 @@ pub enum ShieldColor {
|
||||
}
|
||||
|
||||
/// The crop gear menu's shield options. Photoshop's defaults: shown, enabled, Match Canvas, 75 %, Auto Adjust on.
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, craft_ui_macros::PlainData)]
|
||||
#[serde(default)]
|
||||
#[non_exhaustive]
|
||||
pub struct CropShield {
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ impl EnvValue for craft_behavior::ZoomScheme {
|
||||
}
|
||||
|
||||
/// What a number counts.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, craft_ui_macros::PlainData)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[non_exhaustive]
|
||||
pub enum UnitKind {
|
||||
|
||||
Reference in new issue
Block a user