fix(styles): make double-click inline rename actually fire

The list row wrapped a `button` inside the `mouse_area`. The button
captured the press, so the parent `mouse_area` never saw the second
click and `on_double_click` never fired — double-clicking a style name
did nothing.

Drop the inner button: the row is now a plain `mouse_area` carrying both
`on_press` (select) and `on_double_click` (start rename), with selection
shown via the container background. Focus the rename field on start so
the user can type immediately.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-10 15:10:09 +03:00
1 parent f2dfd01795
commit 65a25033bc
3 files changed
+47 -42

No files matched your search

+3 -1
View File
@@ -6170,7 +6170,9 @@ impl OpenCADStudio {
// ── Shared inline rename (all style managers) ─────────────────
Message::StyleRenameStart(kind, name) => {
self.style_rename_start(kind, name);
Task::none()
// Focus the freshly-shown rename field so the user can type
// immediately after the double click.
iced::widget::operation::focus(crate::ui::style_list::rename_input_id())
}
Message::StyleRenameEdit(s) => {
self.style_rename_buf = s;