diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index f5fd06a053..f29cdea76f 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -188,8 +188,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S wxAcceleratorEntry entries[100]; int id = 0; - for (const auto* entry : entries_cache) - entries[id++].Set(entry->GetFlags(), entry->GetKeyCode(), entry->GetMenuItem()->GetId()); + //for (const auto* entry : entries_cache) + // entries[id++].Set(entry->GetFlags(), entry->GetKeyCode(), entry->GetMenuItem()->GetId()); #if _WIN32 // This is needed on Windows to fake the CTRL+# of the window menu when using the numpad @@ -1624,7 +1624,7 @@ void MainFrame::init_menubar_as_editor() // Help menu auto helpMenu = generate_help_menu(); -#ifndef __APPLE__ +#if 0//ndef__APPLE__ // append menus for Menu button from TopBar m_bar_menus.AppendMenuItem(fileMenu, _L("&File")); @@ -1660,10 +1660,12 @@ void MainFrame::init_menubar_as_editor() SetMenuBar(m_menubar); +#ifdef __APPLE__ init_macos_application_menu(m_menubar, this); - #endif // __APPLE__ +#endif + if (plater()->printer_technology() == ptSLA) update_menubar(); } diff --git a/src/slic3r/GUI/MainFrame.hpp b/src/slic3r/GUI/MainFrame.hpp index 00dacc45c2..2ef4883d81 100644 --- a/src/slic3r/GUI/MainFrame.hpp +++ b/src/slic3r/GUI/MainFrame.hpp @@ -92,9 +92,6 @@ class MainFrame : public DPIFrame wxMenuBar* m_menubar{ nullptr }; TopBarMenus m_bar_menus; -#if 0 - wxMenuItem* m_menu_item_repeat { nullptr }; // doesn't used now -#endif wxMenuItem* m_menu_item_reslice_now { nullptr }; wxSizer* m_main_sizer{ nullptr }; diff --git a/src/slic3r/GUI/TopBar.cpp b/src/slic3r/GUI/TopBar.cpp index bed2e15fec..7c4305e395 100644 --- a/src/slic3r/GUI/TopBar.cpp +++ b/src/slic3r/GUI/TopBar.cpp @@ -368,7 +368,7 @@ void TopBarItemsCtrl::UpdateSearch(const wxString& search) void TopBarItemsCtrl::update_margins() { int em = em_unit(this); - m_btn_margin = std::lround(0.9 * em); + m_btn_margin = std::lround(0.5 * em); } wxPoint TopBarItemsCtrl::ButtonWithPopup::get_popup_pos() @@ -436,7 +436,7 @@ TopBarItemsCtrl::TopBarItemsCtrl(wxWindow *parent, TopBarMenus* menus/* = nullpt this->SetSizer(m_sizer); wxBoxSizer* left_sizer = new wxBoxSizer(wxHORIZONTAL); - +/* #ifdef __APPLE__ auto logo = new wxStaticBitmap(this, wxID_ANY, *get_bmp_bundle(wxGetApp().logo_name(), 40)); left_sizer->Add(logo, 0, wxALIGN_CENTER_VERTICAL | wxALL, m_btn_margin); @@ -449,7 +449,7 @@ TopBarItemsCtrl::TopBarItemsCtrl(wxWindow *parent, TopBarMenus* menus/* = nullpt m_menus->Popup(this, &m_menus->main, m_menu_btn->get_popup_pos()); }); #endif - +*/ if (m_cb_settings_btn) { m_settings_btn = new Button(this, _L("Settings"/*, "settings"*/)); m_settings_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event) { m_cb_settings_btn(); });