ui: neutral wording in code and help text; keywords first in the command menu

Comments and the Options help text describe the behaviour of commercial
solutions without naming any product. The command menu puts the command's
keywords directly under Enter / Cancel, with Recent Input and Snap
Overrides below them, so the choices that change from step to step are the
closest to the pointer.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-17 12:05:15 +03:00
1 parent 02cd98e790
commit 0fbb5bcb4f
35 files changed
+83 -81

No files matched your search

+1 -1
View File
@@ -63,7 +63,7 @@ impl OpenCADStudio {
// routing, so every path below (Start-tab gate, plugins, all dispatch
// families, the Repeat menu) sees the canonical command. Arguments after
// the first space are left untouched. A non-alias passes through as-is.
// AutoCAD's transparent prefix: `'PAN` / `'ZOOM` run in the middle
// The transparent prefix of commercial solutions: `'PAN` / `'ZOOM` run in the middle
// of another command and hand control back to it afterwards.
let (cmd, quoted) = match cmd.trim().strip_prefix('\'') {
Some(rest) => (rest.trim(), true),
+2 -2
View File
@@ -1492,9 +1492,9 @@ impl OpenCADStudio {
Ok((format!("ZOOMFACTOR = {}", self.zoom_factor), false))
}
},
// AutoCAD bit code: 0 = no shortcut menus (right-click
// Bit code of commercial solutions: 0 = no shortcut menus (right-click
// is Enter), 16 = time-sensitive; everything else is the
// regular shortcut menu. Reported as AutoCAD's defaults
// regular shortcut menu. Reported as the defaults of commercial solutions
// (11 = default+edit+command menus, +16 when
// time-sensitive).
"SHORTCUTMENU" => {
+3 -3
View File
@@ -132,16 +132,16 @@ impl CursorType {
}
}
/// What a right-click in the drawing area does (AutoCAD SHORTCUTMENU /
/// What a right-click in the drawing area does (SHORTCUTMENU in commercial solutions /
/// "Right-click Customization").
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum RightClickMode {
/// AutoCAD default: a right-click always opens the shortcut menu (Enter /
/// The default of commercial solutions: a right-click always opens the shortcut menu (Enter /
/// Cancel / the command's options while a command runs; Repeat / edit
/// tools when idle).
#[default]
ShortcutMenu,
/// AutoCAD "time-sensitive right-click": a quick click is Enter (or
/// The "time-sensitive right-click" of commercial solutions: a quick click is Enter (or
/// repeats the last command when idle); holding the button longer than
/// `right_click_hold_ms` opens the shortcut menu.
TimeSensitive,
+2 -2
View File
@@ -234,7 +234,7 @@ impl OpenCADStudio {
/// when the message was consumed; `None` lets it fall through to the
/// normal handlers (after closing the menu when the key is not a menu key,
/// so typing a command name or a coordinate just works — the menu gets
/// out of the way exactly as it does in AutoCAD).
/// out of the way exactly as it does in commercial solutions).
pub(in crate::app) fn intercept_context_menu_key(&mut self, msg: &Message) -> Option<Task<Message>> {
match msg {
Message::ArrowKeyPressed { direction, .. }
@@ -308,7 +308,7 @@ impl OpenCADStudio {
None
}
/// Grip-mode shortcut menu (AutoCAD's grip menu): the grip stays hot
/// Grip-mode shortcut menu (the grip menu of commercial solutions): the grip stays hot
/// for Stretch / Base Point / Copy / Undo; Move / Rotate / Scale / Mirror
/// hand the selection to the matching command with the grip as its base
/// point; Exit drops the edit.
+3 -3
View File
@@ -304,7 +304,7 @@ impl OpenCADStudio {
}
// The open right-click context menu owns the keyboard the same way:
// arrows / Enter / mnemonic letters drive it, any other key closes it
// and falls through to the command line (AutoCAD behaviour).
// and falls through to the command line (the behaviour of commercial solutions).
if self.context_menu_open() {
if let Some(task) = self.intercept_context_menu_key(&msg) {
return task;
@@ -3582,7 +3582,7 @@ impl OpenCADStudio {
return self.update(Message::CommandFinalize);
}
// A right-click. What it does is the user's choice (Options →
// User Preferences, AutoCAD's SHORTCUTMENU):
// User Preferences, SHORTCUTMENU in commercial solutions):
// • Shortcut menu — always open the context menu, whose
// default row (Enter / Repeat) sits under the pointer.
// • Time-sensitive — a quick click is Enter while a command
@@ -3607,7 +3607,7 @@ impl OpenCADStudio {
sel.right_click_entered = true;
drop(sel);
// CommandFinalize is Enter during a command and "repeat
// the last command" when idle — exactly AutoCAD's quick
// the last command" when idle — exactly the quick
// right-click.
return self.update(Message::CommandFinalize);
}
+1 -1
View File
@@ -6237,7 +6237,7 @@ properties={:.1}ms picked={}",
/// Grip-menu Copy: leave the originals where they were and add the
/// edited shapes as new entities, then re-arm the same grip at its
/// origin so the next placement makes another copy (AutoCAD grip Copy).
/// origin so the next placement makes another copy (grip Copy, as in commercial solutions).
fn commit_active_grip_edit_as_copy(&mut self, grip: GripEdit) -> Task<Message> {
let i = self.active_tab;
let handles = std::mem::take(&mut self.grip_preview_handles);
+1 -1
View File
@@ -1150,7 +1150,7 @@ fn context_menu_gutter(icon: Option<MenuIcon>) -> Element<'static, Message> {
/// Render the right-click context menu (rows from
/// `ui::popup::context_menu::build_context_menu`). The panel is placed so the
/// default row sits under the pointer: right-click then left-click in place
/// completes the step without moving the mouse (AutoCAD anchors its shortcut
/// completes the step without moving the mouse (commercial solutions anchor their shortcut
/// menu the same way). `highlighted` is the keyboard highlight, if any.
pub(super) fn viewport_context_menu_overlay(
pos: iced::Point,