diff --git a/crates/draw/src/ui/brush_presets/picker.rs b/crates/draw/src/ui/brush_presets/picker.rs index a69ce9ea12..a674ee4441 100644 --- a/crates/draw/src/ui/brush_presets/picker.rs +++ b/crates/draw/src/ui/brush_presets/picker.rs @@ -224,7 +224,7 @@ impl Opened { } } -/// Photoshop's Brush Preset picker: a closed field showing the current preset's tip with the brush size under it, which opens +/// Photoshop's Brush Preset picker: a compact chip (`PickerField::Chip`) showing the current preset's tip with the brush size under it, which opens /// a popover over [`PresetPicker`]. /// /// - **Head.** While [`BrushPickerValues::tip`] is set, [`TipEllipse`] (angle and roundness) at the start; beside it @@ -459,7 +459,7 @@ impl<'a, K: Value + Eq + Hash> BrushPresetPicker<'a, K> { }); }; let mut picker = PresetPicker::new(words.picker.clone(), current.reborrowed(), rows, Bind::bound(&mut browser)) - .field(PickerField::Thumbnail) + .field(PickerField::Chip) .caption(env.units().number(values.diameter.round(), 0..=0)) .cell_shape(CellShape::Square) .view(if parts.tip_only() { PresetView::Grid } else { PresetView::List }) diff --git a/crates/draw/src/ui/crop/bar.rs b/crates/draw/src/ui/crop/bar.rs index 8ffb10527b..c9e2f4892a 100644 --- a/crates/draw/src/ui/crop/bar.rs +++ b/crates/draw/src/ui/crop/bar.rs @@ -10,13 +10,13 @@ use craft_behavior::{EditEvent, EditEvents, IconId, NumberCodec}; use craft_ui::buttons::{Button, IconButton, ToggleButton}; use craft_ui::choice::Checkbox; use craft_ui::contract::{ - Bind, BodyCx, Entry, Gap, LabelKind, NoValue, Outcome, Props as _, Remember as _, Show as _, ShowContainer as _, SideLabel, Sizing, clicked, + Bind, BodyCx, Entry, Gap, LabelKind, NoValue, Outcome, Props as _, Remember as _, Show as _, ShowContainer as _, SideLabel, clicked, }; use craft_ui::display::Divider; use craft_ui::form::Field; use craft_ui::layout_components::Row; use craft_ui::pickers::Select; -use craft_ui::runtime::env::{Env, Label, UnitKind, Units}; +use craft_ui::runtime::env::{Env, Label, Units}; use craft_ui::runtime::requests::ColorRequest; use craft_ui::text::NumberField; use egui::{Response, Ui}; @@ -46,8 +46,6 @@ pub struct CropBarOutput { pub ratio: Option, /// The Straighten button was pressed: the app calls `CropTool::toggle_straighten`. pub straighten: bool, - /// The Angle field was edited: the app turns the frame to this angle, in degrees. - pub angle: Option, /// New Crop Preset…: the app opens its dialog with [`CropSettings::preset_name`]. pub new_preset: bool, /// Delete Crop Preset…: the app opens its dialog. @@ -83,8 +81,8 @@ impl Outcome for CropBarOutput { /// - Order (Photoshop's): the preset list ([`CropPresetList`]: Selection when offered, Ratio, W x H x Resolution, the /// ratio presets, the size presets, the user's presets, Front Image, a rule, New Crop Preset…, Delete Crop /// Preset…); the W and H ratio fields (0 to 99,999 with 3 decimals) with the swap button between them, or in -/// W × H × Resolution mode the W, H and Resolution fields with the px/in or px/cm select; Clear; the Angle field; -/// the Straighten toggle (pressed while armed); the overlay menu ([`CropOverlayMenu`]); the gear popover +/// W × H × Resolution mode the W, H and Resolution fields with the px/in or px/cm select; Clear; the labelled +/// Straighten toggle (pressed while armed); the frame's angle is edited on the canvas; the overlay menu ([`CropOverlayMenu`]); the gear popover /// ([`CropOptionsMenu`]); the Delete Cropped Pixels check box; Fill and its select; the help button when a help /// label is given; Reset. /// - W and H keep their lengths with the unit they were entered in ([`CropLength`](super::CropLength)); a cleared @@ -94,7 +92,7 @@ impl Outcome for CropBarOutput { /// is `None`; Original Ratio and Front Image without a document. /// - Fill's first entry reads Transparent while Delete Cropped Pixels is off and Background while it is on. /// - **Keyboard and AccessKit:** the list is a select named "Crop ratio" with the chosen entry as its value; the -/// fields are named Width, Height, Resolution and Angle; the Straighten toggle has its pressed state; the menus +/// fields are named Width, Height and Resolution; the Straighten toggle has its pressed state; the menus /// open with Enter or Space. #[must_use = "show the bar's children with `show`"] #[derive(craft_ui::contract::Pattern, craft_ui::contract::Props)] @@ -107,9 +105,6 @@ pub struct CropBar<'a> { /// The Straighten toggle's pressed state (`CropTool::straighten_armed`). #[prop] straighten: bool, - /// The frame's angle in degrees, for the Angle field; without a frame the field is disabled. - #[prop(quantity = "angle in degrees")] - angle: Option, /// The help button after Fill; `Some` shows it, named by the label. #[prop(into)] help: Option