forked from 1b-agent/opencadstudio-upstream
feat(ui): add press-to-capture shortcut editing to Keyboard Shortcuts dialog
Replace manual key entry with per-row capture cells: clicking + Add inserts a draft row at the top with its key cell armed, and the next key combination is recorded and normalized (Ctrl+Shift+S → CTRL+SHIFT+S). While armed, a dedicated keyboard listener swallows all input so recorded shortcuts do not execute in the drawing. Draft rows are transient and confirmed only through an explicit accept button, so the table never retains empty rows. Duplicate keys and unrunnable commands are flagged in danger styling with a persistent warning naming the conflicting command. Added reset-to-defaults with confirmation, apply-and-exit, a shortcut count, and an unsaved-changes guard on close.
This commit is contained in:
1 parent
6d6defa0ad
commit
afff1a40dd
7 files changed
+673
-46
No files matched your search
@@ -531,6 +531,17 @@ pub fn themed_success<'a, M: 'a>(bytes: &'static [u8], size: f32) -> Element<'a,
|
||||
.into()
|
||||
}
|
||||
|
||||
/// Render an icon with the foreground chosen for a success-coloured surface.
|
||||
pub fn themed_success_text<'a, M: 'a>(bytes: &'static [u8], size: f32) -> Element<'a, M> {
|
||||
svg(themed_handle(bytes))
|
||||
.width(size)
|
||||
.height(size)
|
||||
.style(|theme: &Theme, _| svg::Style {
|
||||
color: Some(theme.palette().success.base.text),
|
||||
})
|
||||
.into()
|
||||
}
|
||||
|
||||
/// Render a warning-state chrome icon from the active Iced theme.
|
||||
pub fn themed_warning<'a, M: 'a>(bytes: &'static [u8], size: f32) -> Element<'a, M> {
|
||||
svg(themed_handle(bytes))
|
||||
|
||||
Reference in new issue
Block a user