From ea9143cc876d7045cf76bf69f7a8cd9f0658a5af Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Oct 2026 19:03:09 +0000 Subject: [PATCH] Select Color: gray pipette that takes the accent colour on hover Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013rGmDUNr1hUf4zo1X3dak8 --- src/ui/color_select/picker.rs | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/ui/color_select/picker.rs b/src/ui/color_select/picker.rs index ca28b2b85..090bc91fd 100644 --- a/src/ui/color_select/picker.rs +++ b/src/ui/color_select/picker.rs @@ -398,11 +398,28 @@ impl ColorPicker { } else { Some( // Just the icon, without a button frame. - button(crate::ui::icons::themed(crate::ui::icons::EYEDROPPER, 24.0)) - .on_press(picker_msg(ColorPickerMsg::Eyedropper(EyedropperMsg::Start))) - .padding(0) - .style(|_theme: &Theme, _status| button::Style::default()) - .into(), + button( + // Gray at rest; the accent colour while the pointer is on it. + iced::widget::svg(crate::ui::icons::themed_handle( + crate::ui::icons::EYEDROPPER, + )) + .width(24) + .height(24) + .style(|theme: &Theme, status| iced::widget::svg::Style { + color: Some(match status { + iced::widget::svg::Status::Hovered => { + theme.palette().primary.base.color + } + iced::widget::svg::Status::Idle => { + theme.palette().background.base.text.scale_alpha(0.5) + } + }), + }), + ) + .on_press(picker_msg(ColorPickerMsg::Eyedropper(EyedropperMsg::Start))) + .padding(0) + .style(|_theme: &Theme, _status| button::Style::default()) + .into(), ) }; let nearest = (!self.editor_only()).then(|| self.nearest_button());