Reverted menu bar for application

+ TopBar: Hidden menu button/ Logo
This commit is contained in:
YuSanka 2024-07-12 14:40:06 +02:00 committed by Lukas Matena
parent 4e157b7765
commit de7fad1b48
3 changed files with 9 additions and 10 deletions

View File

@ -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();
}

View File

@ -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 };

View File

@ -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(); });