mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 13:45:59 +08:00
Fixed OSX build and some of warnings
This commit is contained in:
parent
1c4b9d43d1
commit
bf8c3e7653
@ -1516,7 +1516,7 @@ void MainFrame::init_menubar_as_editor()
|
||||
|
||||
editMenu->AppendSeparator();
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Searc&h") + "\tCtrl+F",
|
||||
_L("Search in settings"), [this](wxCommandEvent&) { wxGetApp().show_search_dialog(); },
|
||||
_L("Search in settings"), [](wxCommandEvent&) { wxGetApp().show_search_dialog(); },
|
||||
"search", nullptr, []() {return true; }, this);
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ void TopBarItemsCtrl::Button::set_hovered(bool hovered)
|
||||
#ifdef _WIN32
|
||||
this->GetParent()->Refresh(); // force redraw a background of the selected mode button
|
||||
#else
|
||||
SetForegroundColour(wxSystemSettings::GetColour(set_focus ? wxSYS_COLOUR_BTNTEXT :
|
||||
SetForegroundColour(wxSystemSettings::GetColour(hovered ? wxSYS_COLOUR_BTNTEXT :
|
||||
#if defined (__linux__) && defined (__WXGTK3__)
|
||||
wxSYS_COLOUR_GRAYTEXT
|
||||
#elif defined (__linux__) && defined (__WXGTK2__)
|
||||
@ -136,7 +136,7 @@ void TopBarItemsCtrl::ApplyWorkspacesMenu()
|
||||
Slic3r::ConfigOptionMode::comExpert }) {
|
||||
const wxString label = get_workspace_name(mode);
|
||||
append_menu_item(&m_workspaces_menu, wxID_ANY, label, label,
|
||||
[this, mode](wxCommandEvent&) {
|
||||
[mode](wxCommandEvent&) {
|
||||
if (wxGetApp().get_mode() != mode)
|
||||
wxGetApp().save_mode(mode);
|
||||
}, get_bmp_bundle("mode", 16, -1, wxGetApp().get_mode_btn_color(mode)));
|
||||
@ -157,11 +157,11 @@ void TopBarItemsCtrl::CreateAuthMenu()
|
||||
m_auth_menu.AppendSeparator();
|
||||
|
||||
m_connect_dummy_menu_item = append_menu_item(&m_auth_menu, wxID_ANY, _L("PrusaConnect Printers"), "",
|
||||
[this](wxCommandEvent&) { wxGetApp().plater()->get_user_account()->enqueue_connect_printers_action(); },
|
||||
[](wxCommandEvent&) { wxGetApp().plater()->get_user_account()->enqueue_connect_printers_action(); },
|
||||
"", nullptr, []() { return wxGetApp().plater()->get_user_account()->is_logged(); }, this->GetParent());
|
||||
|
||||
m_login_menu_item = append_menu_item(&m_auth_menu, wxID_ANY, "", "",
|
||||
[this](wxCommandEvent&) {
|
||||
[](wxCommandEvent&) {
|
||||
auto user_account = wxGetApp().plater()->get_user_account();
|
||||
if (user_account->is_logged())
|
||||
user_account->do_logout(wxGetApp().app_config);
|
||||
|
@ -84,7 +84,6 @@ public:
|
||||
wxWindow* GetSearchCtrl() { return m_search->GetTextCtrl(); }
|
||||
|
||||
private:
|
||||
wxWindow* m_parent;
|
||||
wxFlexGridSizer* m_buttons_sizer;
|
||||
wxFlexGridSizer* m_sizer;
|
||||
ButtonWithPopup* m_menu_btn {nullptr};
|
||||
@ -474,8 +473,6 @@ private:
|
||||
unsigned m_showTimeout,
|
||||
m_hideTimeout;
|
||||
|
||||
TopBarItemsCtrl* m_ctrl{ nullptr };
|
||||
|
||||
};
|
||||
//#endif // _WIN32
|
||||
#endif // slic3r_TopBar_hpp_
|
||||
|
@ -2067,7 +2067,7 @@ void DiffPresetDialog::button_event(Action act)
|
||||
get_selected_options(type));
|
||||
});
|
||||
else if (!presets_to_save.empty())
|
||||
process_options([this](Preset::Type type) {
|
||||
process_options([](Preset::Type type) {
|
||||
if (Tab* tab = wxGetApp().get_tab(type)) {
|
||||
tab->update_preset_choice();
|
||||
wxGetApp().sidebar().update_presets(type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user