forked from 1b-agent/opencadstudio-upstream
Select Color: review cleanups
- Split ColorEditor::view into mode_row, slider_rows, field_view, hex_row and hex_field; output is unchanged. - hex_string reuses config::rgb_to_hex, and parse_hex documents why it stays separate (it also accepts #RGB). - ink_is_dark uses Color::into_rgba8 instead of rounding by hand. - Remove four translation keys the old dialog used and nothing references any more, from the catalog and all 22 locales. - Eyedropper: without a main window there is no screenshot to wait for, so leave the eyedropper; keep the magnifier inside small windows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013rGmDUNr1hUf4zo1X3dak8
This commit is contained in:
28 files changed
+147
-221
No files matched your search
@@ -11039,13 +11039,16 @@ impl OpenCADStudio {
|
||||
}
|
||||
Some(crate::ui::color_select::Outcome::Screenshot) => {
|
||||
use crate::ui::color_select::{eyedropper::EyedropperMsg, ColorPickerMsg};
|
||||
self.main_window.map_or_else(Task::none, |id| {
|
||||
iced::window::screenshot(id).map(|shot| {
|
||||
match self.main_window {
|
||||
Some(id) => iced::window::screenshot(id).map(|shot| {
|
||||
Message::ColorPicker(ColorPickerMsg::Eyedropper(
|
||||
EyedropperMsg::Shot(shot),
|
||||
))
|
||||
})
|
||||
})
|
||||
}),
|
||||
// Nothing to capture: leave the eyedropper instead
|
||||
// of waiting for a screenshot that never comes.
|
||||
None => self.update(Message::ColorPicker(ColorPickerMsg::Cancel)),
|
||||
}
|
||||
}
|
||||
None => Task::none(),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user