forked from 1b-agent/opencadstudio-upstream
Dock: review fixes - hover, preview width, stale indexes, config healing
Fixes: - Hover state no longer drops when the pointer moves up from one strip icon, group grip or title bar to the one above: iced handles the element above first, so the old element's "left" (None) cleared the hover just set. Leave messages now carry the element and only clear their own hover. - The drop preview used the pallets' own widths; it now uses the group's width, matching where the pallet lands. - Group indexes from messages (group grab, splitter) are looked up safely, so a message from before a layout change no longer panics. - Floating placements read from the config are healed (finite, positive, at least the minimum size), like the group weights already were. - The shown group's edge bar is centred in its row: a stack takes its height from its first layer, and the icon column was shorter than the row. The "Drag to move group" tooltip is removed. Simplifications (no behaviour change): - dock_open_at_default / dock_unpeek replace seven copies of "dock on the right if unplaced, then reveal" and four of "stop peeking". - The drop target takes the grab offset as a parameter, so a drag update stores its state once. - dock_set_open, ensure_settings, the shown-index bookkeeping after a group is removed and the on-screen width clamp each lose duplication. - VBarLabel drops options its single caller never varied. - The drop preview's landing computation is one helper. Naming and consistency: pallet names in the + menu, the drag ghost and the floating title bar go through t!(); StripHit::Tab becomes StripHit::Join; stale comments updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
This commit is contained in:
11 files changed
+239
-258
No files matched your search
@@ -173,11 +173,7 @@ impl OpenCADStudio {
|
||||
// The node library docks on the right on first use; after
|
||||
// that it stays wherever the user moved it.
|
||||
let id = crate::ui::dock::PanelId::NodeGraph;
|
||||
if !self.dock.is_placed(id) {
|
||||
self.dock
|
||||
.dock(id, crate::app::config::DockSide::Right, usize::MAX);
|
||||
}
|
||||
self.dock_reveal(id);
|
||||
self.dock_open_at_default(id);
|
||||
return self.graph_run(i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user