diff --git a/crates/draw/src/ui/brush_presets/picker.rs b/crates/draw/src/ui/brush_presets/picker.rs index 39d85009a..a69ce9ea1 100644 --- a/crates/draw/src/ui/brush_presets/picker.rs +++ b/crates/draw/src/ui/brush_presets/picker.rs @@ -270,8 +270,15 @@ pub struct BrushPresetPicker<'a, K: Value + Eq + Hash> { #[prop] resizable: Option, opened_at: Option<(Pos2, Bind<'a, bool>)>, + /// The compact form: the popover shows only the head (Size, Hardness for round tips, the tip widget), without the + /// search row, the gear or the browser. + #[prop] compact: bool, + /// Whether the picker takes input: off disables its field, its head and its popover. It is enabled by default. + #[prop] enabled: bool, + /// App rows drawn under the head. + #[prop(name = "rows", boxed = "FnOnce(&mut Ui) + 'a")] app_rows: Option>, } @@ -305,25 +312,6 @@ impl<'a, K: Value + Eq + Hash> BrushPresetPicker<'a, K> { } } - /// The compact form: the popover shows only the head (Size, Hardness for round tips, the tip widget), without the - /// search row, the gear or the browser. - pub fn compact(mut self, on: bool) -> Self { - self.compact = on; - self - } - - /// Whether the picker takes input: off disables its field, its head and its popover. It is enabled by default. - pub fn enabled(mut self, on: bool) -> Self { - self.enabled = on; - self - } - - /// App rows drawn under the head. - pub fn rows(mut self, rows: impl FnOnce(&mut Ui) + 'a) -> Self { - self.app_rows = Some(Box::new(rows)); - self - } - /// Opens the popover at `at`, a point in the parent's layer space, while `open` is true, and shows no field: the /// app opens it (a right-click on the canvas) and every close writes `false`. pub fn open_at(mut self, at: Pos2, open: Bind<'a, bool>) -> Self { diff --git a/crates/draw/src/ui/measure/overlay.rs b/crates/draw/src/ui/measure/overlay.rs index 2469215b1..3b56518c3 100644 --- a/crates/draw/src/ui/measure/overlay.rs +++ b/crates/draw/src/ui/measure/overlay.rs @@ -119,15 +119,12 @@ pub struct RulerOverlay<'a> { #[common] common: Common, line: Bind<'a, Option>, - /// Whether the overlay only paints: no parts, no Tab stop, no keys. - #[prop] - read_only: bool, } impl<'a> RulerOverlay<'a> { /// An overlay named `label` over the Ruler `line` (document units). pub fn new(label: impl Into