Make the Design tab sidebar dockable and collapsible like Prepare's

The sidebar can move to either side, float, be resized, and collapse with
the canvas button or Shift+Tab. Its layout is remembered separately from
Prepare's, starts where Prepare's sidebar is, and View > Reset Window
Layout resets both tabs.
This commit is contained in:
SoftFever
2026-10-03 19:05:53 +08:00
parent a9c8721380
commit d47fb804c3
17 changed files with 420 additions and 164 deletions
+8
View File
@@ -1249,6 +1249,10 @@ void MainFrame::shutdown()
m_plugin_pages.shutdown();
if (m_plater != nullptr)
m_plater->remove_dock_panes();
#ifdef SLIC3R_CAD
if (DesignPanel* design = DesignPanel::if_built())
design->shutdown();
#endif
#ifdef __WXGTK__
// Edge panels are child windows — wxWidgets destroys them automatically.
m_edge_bottom = nullptr;
@@ -3377,6 +3381,10 @@ void MainFrame::init_menubar_as_editor()
viewMenu, wxID_ANY, _L("Reset Window Layout"), _L("Reset to default window layout"),
[this](wxCommandEvent&) { m_plater->reset_window_layout(); }, "", this,
[this]() {
#ifdef SLIC3R_CAD
if (shown_design_panel() != nullptr)
return true;
#endif
return is_prepare_or_preview_tab() && m_plater->is_sidebar_enabled();
},
this);