From a5024c0bc9d8fc7961ef3b850f33967d10a6debf Mon Sep 17 00:00:00 2001 From: aiongg Date: Sat, 14 Nov 2026 02:19:29 +0000 Subject: [PATCH] wip --- crates/imaging/src/ui/blur_pins/panel.rs | 8 ++++ crates/imaging/src/ui/channels/menu.rs | 16 +++++++- crates/imaging/src/ui/channels/mod.rs | 2 +- crates/imaging/src/ui/fill/stories.rs | 2 +- crates/imaging/src/ui/wide_angle/mod.rs | 51 +++++++++++++++++++++++- 5 files changed, 74 insertions(+), 5 deletions(-) diff --git a/crates/imaging/src/ui/blur_pins/panel.rs b/crates/imaging/src/ui/blur_pins/panel.rs index 4c4b1d179..442c1f104 100644 --- a/crates/imaging/src/ui/blur_pins/panel.rs +++ b/crates/imaging/src/ui/blur_pins/panel.rs @@ -37,6 +37,14 @@ impl<'a> BlurPinsPanel<'a> { Self { pins } } + /// Inside a modal body, declares the canvas gesture each pass, so the pins on the canvas keep their presses while + /// the Blur Gallery dialog is modal. + #[must_use] + pub fn canvas(self, canvas: egui::Id) -> Self { + let _ = canvas; + todo!("dl.K62") + } + /// Draws the rows and returns the response and any amount edit. pub fn show(self, ui: &mut Ui) -> BlurPinsPanelOutput { // pc: crates/ui-egui/src/dialogs/blur_pins.rs:398 `body` (the slider, the hints). diff --git a/crates/imaging/src/ui/channels/menu.rs b/crates/imaging/src/ui/channels/menu.rs index 008a046cd..70a8743e3 100644 --- a/crates/imaging/src/ui/channels/menu.rs +++ b/crates/imaging/src/ui/channels/menu.rs @@ -323,8 +323,22 @@ fn plan(kind: Option) -> Vec { lines } +/// Photoshop's fixed panel menu list: New Channel…, Duplicate Channel, Delete Channel, New Spot Channel…, Merge Spot +/// Channel, Channel Options…, Split Channels, Merge Channels…, with separators between the groups. +pub fn panel_rows() -> Vec { + todo!("pn.C30") +} + +/// Each command greyed by the targeted row's kind, the one rule the panel's publish loop and the dock's panel menu share. +pub fn states(rows: &[ChannelRow]) -> Vec<(ChannelsCommands, craft_ui::runtime::commands::CommandState)> { + let _ = rows; + todo!("pn.C30") +} + /// The rows the panel adds to its panel menu, for the targeted row of `rows`: the commands of its row menu. -pub fn panel_rows(rows: &[ChannelRow], words: &ChannelsWords) -> Vec { +// P3(panels-w6): pn.C30 — the old `panel_rows(rows, words)`; phase 3 removes it with its readers. +#[allow(dead_code)] +pub(super) fn panel_rows_for(rows: &[ChannelRow], words: &ChannelsWords) -> Vec { let command = |c: ChannelsCommands| PanelRow::Command(CommandRef::from(c)); let kind = targeted_row(rows).map(|row| row.kind); let mut out = Vec::new(); diff --git a/crates/imaging/src/ui/channels/mod.rs b/crates/imaging/src/ui/channels/mod.rs index 174437e79..12272b4c5 100644 --- a/crates/imaging/src/ui/channels/mod.rs +++ b/crates/imaging/src/ui/channels/mod.rs @@ -12,6 +12,6 @@ pub(crate) mod stories; pub use footer::ChannelsFooterButton; pub use labels::ChannelsWords; -pub use menu::{ChannelsCommands, panel_rows}; +pub use menu::{ChannelsCommands, panel_rows, states}; pub use model::{ChannelKind, ChannelRow, ChannelsEvent, ChannelsOutput, ColorIndicates, OVERLAY_OPACITIES, OverlayPreset, targeted_row}; pub use panel::ChannelsPanel; diff --git a/crates/imaging/src/ui/fill/stories.rs b/crates/imaging/src/ui/fill/stories.rs index 6f2736738..ac5eedb59 100644 --- a/crates/imaging/src/ui/fill/stories.rs +++ b/crates/imaging/src/ui/fill/stories.rs @@ -108,7 +108,7 @@ impl FillSource for StorySource { } std::thread::sleep(Duration::from_secs(1)); } - Ok(PreviewDone { timing: Duration::ZERO }) + Ok(PreviewDone::new(Duration::ZERO) /* P3(dialogs-w10): dl.K60 */) }), Preview::Failed => Job::new(|_, _| Err("nothing to sample from: the sampling area has no pixels outside the fill area".to_owned())), } diff --git a/crates/imaging/src/ui/wide_angle/mod.rs b/crates/imaging/src/ui/wide_angle/mod.rs index 0ceac5cc8..3dfc0f9a4 100644 --- a/crates/imaging/src/ui/wide_angle/mod.rs +++ b/crates/imaging/src/ui/wide_angle/mod.rs @@ -74,17 +74,32 @@ pub enum WideAngleTool { pub struct PreviewDone { /// How long the solve and warp took. pub timing: Duration, + /// What rendered it ("GPU", "CPU"), shown with the time. + pub backend: Option