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