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 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-10 15:10:09 +03:00
commit 65a25033bc
3 changed files with 47 additions and 42 deletions

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;