From 290f3f45f17bc705f1186d90c00b8d4bd0184102 Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 16 Nov 2026 13:27:45 +0000 Subject: [PATCH] design-lint: props: derive the setters of imaging components (#[prop]) and drop the hand setters --- crates/imaging/src/ui/selection/overlay.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/imaging/src/ui/selection/overlay.rs b/crates/imaging/src/ui/selection/overlay.rs index bd3666cbd..b1040fd13 100644 --- a/crates/imaging/src/ui/selection/overlay.rs +++ b/crates/imaging/src/ui/selection/overlay.rs @@ -153,7 +153,8 @@ pub struct SelectionOverlay<'a> { /// pixels each way. 0 counts as 1. #[prop(quantity = "reduction")] reduction: u32, - /// The outline's map, document point to document point; set with [`mapped`](Self::mapped). + /// Draws the outline through `map` (a [`PointMap`], bends kept); `None` draws it where it is. + #[prop] mapped: Option>, /// The Selection Preview mode (Color Range's modes, or Quick Mask). #[prop] @@ -183,12 +184,6 @@ impl<'a> SelectionOverlay<'a> { } } - /// Draws the outline through `map` (a [`PointMap`], bends kept); `None` draws it where it is. - pub fn mapped(mut self, map: Option>) -> Self { - self.mapped = map; - self - } - /// Shows the overlay over `canvas`, the rect of the canvas it is shown in. pub fn show_at(self, ui: &mut Ui, canvas: Rect) -> SelectionOverlayOutput { let Self { label, source, visible, offset, reduction, mapped, preview, quick_mask, unit } = self;