refactor(ui): adopt iced color picker

Remove local Pin/PickList wrappers and the ACI grid.\nBlock viewport input behind the picker and load iced_aw glyphs.
This commit is contained in:
Hakan Seven 2026-07-30 15:19:58 +03:00
commit c9c3d3b1bf
25 changed files with 289 additions and 255 deletions

View file

@ -210,12 +210,6 @@ impl ModalOptions {
neutral_close: false,
};
pub const MOVABLE_FIXED: Self = Self {
movable: true,
resizable: false,
neutral_close: false,
};
pub const NOTICE: Self = Self {
movable: true,
resizable: false,
@ -223,6 +217,37 @@ impl ModalOptions {
};
}
/// Dim and block the application beneath an overlay-owned dialog.
///
/// Some third-party overlays ignore pointer movement outside their interactive
/// controls. The shield owns the cursor and pointer presses across the window,
/// making such an overlay behave modally.
pub fn backdrop<'a>(
base: impl Into<Element<'a, Message>>,
on_close: Message,
) -> Element<'a, Message> {
let shield = mouse_area(
container(Space::new())
.width(Length::Fill)
.height(Length::Fill)
.style(|theme: &Theme| container::Style {
background: Some(Background::Color(
theme
.palette()
.background
.strongest
.color
.scale_alpha(0.55),
)),
..Default::default()
}),
)
.on_press(on_close)
.interaction(iced::mouse::Interaction::Idle);
stack![base.into(), opaque(shield)].into()
}
/// Stack `content` over `base` behind a dimmed backdrop, framed with a title bar
/// (the ✕ close button at its right end). The backdrop only dims and blocks
/// clicks from reaching the view beneath — it does **not** dismiss the dialog;