ENH:cancel sidebar floatable and ctrl + w

jira: STUDIO-11623
Change-Id: I699c0277797ffc5dda4d540191518eb729e52664
This commit is contained in:
zhou.xu 2025-04-29 20:11:40 +08:00 committed by lane.wei
parent e13c98e4ad
commit 133a7f76b4
3 changed files with 2 additions and 17 deletions

View File

@ -3683,16 +3683,6 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
case WXK_CONTROL_E: case WXK_CONTROL_E:
#endif /* __APPLE__ */ #endif /* __APPLE__ */
{ m_labels.show(!m_labels.is_shown()); m_dirty = true; break; } { m_labels.show(!m_labels.is_shown()); m_dirty = true; break; }
#ifdef __APPLE__
case 'W':
case 'w':
#else /* __APPLE__ */
case WXK_CONTROL_W:
#endif /* __APPLE__ */
{
wxGetApp().plater()->reset_window_layout();
break;
}
case '0': { case '0': {
select_view("plate"); select_view("plate");
zoom_to_bed(); zoom_to_bed();

View File

@ -2897,11 +2897,6 @@ void MainFrame::init_menubar_as_editor()
}, },
this, [this]() { return m_tabpanel->GetSelection() == TabPosition::tp3DEditor || m_tabpanel->GetSelection() == TabPosition::tpPreview; }, this, [this]() { return m_tabpanel->GetSelection() == TabPosition::tp3DEditor || m_tabpanel->GetSelection() == TabPosition::tpPreview; },
[this]() { return wxGetApp().show_3d_navigator(); }, this); [this]() { return wxGetApp().show_3d_navigator(); }, this);
append_menu_item(
viewMenu, wxID_ANY, _L("Reset Window Layout") + "\t" + ctrl + "W", _L("Reset to default window layout"),
[this](wxCommandEvent &) { m_plater->reset_window_layout(); }, "", this,
[this]() { return (m_tabpanel->GetSelection() == TabPosition::tp3DEditor || m_tabpanel->GetSelection() == TabPosition::tpPreview) && m_plater->is_sidebar_enabled(); },
this);
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
append_menu_check_item(viewMenu, wxID_ANY, _L("Show Labels") + "\t" + ctrl + "E", _L("Show object labels in 3D scene"), append_menu_check_item(viewMenu, wxID_ANY, _L("Show Labels") + "\t" + ctrl + "E", _L("Show object labels in 3D scene"),
[this](wxCommandEvent&) { m_plater->show_view3D_labels(!m_plater->are_view3D_labels_shown()); m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT)); }, this, [this](wxCommandEvent&) { m_plater->show_view3D_labels(!m_plater->are_view3D_labels_shown()); m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT)); }, this,

View File

@ -4351,7 +4351,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
m_aui_mgr.SetDockSizeConstraint(1, 1); m_aui_mgr.SetDockSizeConstraint(1, 1);
// m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE, 0); // m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE, 0);
// m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_SASH_SIZE, 2); // m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_SASH_SIZE, 2);
m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_CAPTION_SIZE, 8); m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_CAPTION_SIZE, 0);
m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE); m_aui_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
this->q->SetFont(Slic3r::GUI::wxGetApp().normal_font()); this->q->SetFont(Slic3r::GUI::wxGetApp().normal_font());
@ -4435,7 +4435,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
.CloseButton(false) .CloseButton(false)
.TopDockable(false) .TopDockable(false)
.BottomDockable(false) .BottomDockable(false)
.Floatable(true) //.Floatable(true)
.Resizable(wxGetApp().app_config->get_bool("enable_sidebar_resizable")) .Resizable(wxGetApp().app_config->get_bool("enable_sidebar_resizable"))
.MinSize(wxSize(41 * wxGetApp().em_unit(), -1)) .MinSize(wxSize(41 * wxGetApp().em_unit(), -1))
.BestSize(wxSize(42 * wxGetApp().em_unit(), 90 * wxGetApp().em_unit()))); .BestSize(wxSize(42 * wxGetApp().em_unit(), 90 * wxGetApp().em_unit())));