forked from 1b-agent/opencadstudio-upstream
feat(properties): make read-only values selectable text instead of click-copy
Replace the click-to-instantly-copy read-only cell with a non-editable but selectable text field: the user selects the value (drag / double-click / Ctrl+A) and copies with Ctrl+C, the normal expected gesture. The field carries the full un-truncated value, styled flat (no input box or focus ring) so it still reads as read-only but with a visible selection colour. Keystrokes route to Noop, so it can be selected/copied but never edited. Removes the PropCopyValue message + handler and the mouse_area copy hook. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
c59a584d14
commit
123d4e9083
3 files changed
+35
-58
No files matched your search
@@ -1431,9 +1431,6 @@ pub enum Message {
|
||||
},
|
||||
/// User committed a geometry/common field edit (Enter pressed).
|
||||
PropGeomCommit(&'static str),
|
||||
/// Copy a read-only property value to the system clipboard (click on a
|
||||
/// read-only value cell). Carries the full, un-elided value.
|
||||
PropCopyValue(String),
|
||||
/// User is typing in a block-attribute value field (live buffer update),
|
||||
/// keyed by the attribute tag.
|
||||
PropAttrInput { tag: String, value: String },
|
||||
|
||||
@@ -2107,8 +2107,6 @@ impl OpenCADStudio {
|
||||
|
||||
Message::PropGeomCommit(field) => self.on_prop_geom_commit(field),
|
||||
|
||||
Message::PropCopyValue(value) => iced::clipboard::write(value),
|
||||
|
||||
Message::PropAttrInput { tag, value } => {
|
||||
self.tabs[self.active_tab]
|
||||
.properties
|
||||
|
||||
Reference in new issue
Block a user