forked from 1b-agent/opencadstudio-upstream
Dock: LAYERS opens its pallet like Insert Block, Layer Manager layout fixes, 150 ms auto-hide hover delay
- LAYERS ribbon button runs a command that opens the Layer Manager pallet; the ribbon no longer keeps it highlighted. - Layer Manager: search box stays right-aligned, the column header fills the row, no stray contour lines when the pallet is taller than its rows. - Auto-hidden edges don't show the shown-group accent bar. - Auto-hide reveal and hide wait 150 ms of rest, so passing over the strip doesn't flash groups open. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
This commit is contained in:
9 files changed
+172
-65
No files matched your search
+4
-20
@@ -2552,28 +2552,12 @@ impl OpenCADStudio {
|
||||
Message::ScriptLine(line) => self.feed_script_line(&line),
|
||||
|
||||
Message::ToggleLayers => {
|
||||
use crate::ui::dock::PanelId;
|
||||
if self.show_layers {
|
||||
return self.on_dock(crate::ui::dock::DockMsg::Close(PanelId::Layers));
|
||||
return self.on_dock(crate::ui::dock::DockMsg::Close(
|
||||
crate::ui::dock::PanelId::Layers,
|
||||
));
|
||||
}
|
||||
self.sync_ribbon_layers();
|
||||
self.show_layers = true;
|
||||
if !self.dock.is_placed(PanelId::Layers) {
|
||||
// First use: float it over the middle of the drawing,
|
||||
// where the dialog used to open.
|
||||
let (ww, wh) = self.dock_workspace_size();
|
||||
let (w, h) = self.dock_float_size(PanelId::Layers);
|
||||
self.dock.float(crate::ui::dock::FloatPanel {
|
||||
id: PanelId::Layers,
|
||||
x: ((ww - w) * 0.5).max(0.0),
|
||||
y: ((wh - h) * 0.5).max(0.0),
|
||||
w,
|
||||
h,
|
||||
});
|
||||
self.save_config();
|
||||
}
|
||||
self.dock.raise_float(PanelId::Layers);
|
||||
self.dock_reveal(PanelId::Layers);
|
||||
self.open_layers_pallet();
|
||||
Task::none()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user