From 163ff38c3b05803d1256966dcb72fdd92e7e2a89 Mon Sep 17 00:00:00 2001 From: "chunmao.guo" Date: Thu, 10 Aug 2023 15:23:04 +0800 Subject: [PATCH] ENH: [STUDIO-3895] enable mac window menu Change-Id: Icd53c6866e9108f960aa52e54e518efc5def7101 --- src/slic3r/GUI/MainFrame.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index a746eb981..a094cb1be 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -2211,7 +2211,6 @@ static void add_common_view_menu_items(wxMenu* view_menu, MainFrame* mainFrame, void MainFrame::init_menubar_as_editor() { #ifdef __APPLE__ - wxMenuBar::SetAutoWindowMenu(false); m_menubar = new wxMenuBar(); #endif @@ -2610,6 +2609,14 @@ void MainFrame::init_menubar_as_editor() wxWindowID bambu_studio_id_base = wxWindow::NewControlId(int(2)); wxMenu* parent_menu = m_menubar->OSXGetAppleMenu(); //auto preference_item = new wxMenuItem(parent_menu, BambuStudioMenuPreferences + bambu_studio_id_base, _L("Preferences") + "\tCtrl+,", ""); + + std::string app_items[] = { + L("Services"), + L("Hide BambuStudio"), + L("Hide Others"), + L("Show All"), + L("Quit BambuStudio") + }; #else wxMenu* parent_menu = m_topbar->GetTopMenu(); auto preference_item = new wxMenuItem(parent_menu, ConfigMenuPreferences + config_id_base, _L("Preferences") + "\t" + ctrl + "P", ""); @@ -2951,6 +2958,17 @@ void MainFrame::init_menubar_as_editor() ; }, this); + + m_menubar->Append(new wxMenu(), L("Window")); + std::string window_items[] = { + L("Minimize"), + L("Zoom"), + L("Tile Window to Left of Screen"), + L("Tile Window to Right of Screen"), + L("Replace Tiled Window"), + L("Remove Window from Set"), + L("Bring All to Front") + }; if (helpMenu) m_menubar->Append(helpMenu, wxString::Format("&%s", _L("Help")));