Dock: floating menu at the pointer, hover-only bar buttons, Allow docking, clip pallets

- The floating title bar's right-click menu opens where the pointer is,
  flipped to stay on screen; the Pallets submenu sits beside it.
- Close and pin on a floating title bar only show while it is hovered,
  as on docked title bars.
- New Allow docking check in that menu: off, dragging the window (or a
  pallet out of it) only floats it, never docks it on an edge.
- Floating windows and stacked pallets clip their content, so a pallet
  sized below its content no longer draws outside its frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
This commit is contained in:
Claude committed 2026-10-10 11:18:42 +00:00
1 parent f19948bc07
commit 75fb9e32dd
27 files changed
+161 -25

No files matched your search

+6
View File
@@ -869,6 +869,10 @@ pub(super) struct OpenCADStudio {
/// is open, and whether its Pallets submenu shows.
pub(crate) dock_float_menu: Option<crate::ui::dock::PanelId>,
pub(crate) dock_float_menu_pallets: bool,
/// Pointer position over a floating title bar (bar-local), and where
/// its open menu was asked for.
pub(crate) dock_float_pointer: iced::Point,
pub(crate) dock_float_menu_at: iced::Point,
/// Group whose edge band (group grip) the pointer is over.
pub(crate) dock_grip_hover: Option<(crate::app::config::DockSide, usize)>,
/// Reference-table column currently being width-resized (column index),
@@ -4303,6 +4307,8 @@ impl OpenCADStudio {
dock_hover_gen: 0,
dock_float_menu: None,
dock_float_menu_pallets: false,
dock_float_pointer: iced::Point::ORIGIN,
dock_float_menu_at: iced::Point::ORIGIN,
dock_drag: None,
dock_drag_last: None,
dock_title_hover: None,