mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 16:59:04 +08:00
Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer
This commit is contained in:
commit
1210a250c8
@ -1795,8 +1795,9 @@ void Control::show_add_context_menu()
|
|||||||
append_add_color_change_menu_item(&menu);
|
append_add_color_change_menu_item(&menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
append_menu_item(&menu, wxID_ANY, _L("Add pause print") + " (" + gcode(PausePrint) + ")", "",
|
if (!gcode(PausePrint).empty())
|
||||||
[this](wxCommandEvent&) { add_code_as_tick(PausePrint); }, "pause_print", &menu);
|
append_menu_item(&menu, wxID_ANY, _L("Add pause print") + " (" + gcode(PausePrint) + ")", "",
|
||||||
|
[this](wxCommandEvent&) { add_code_as_tick(PausePrint); }, "pause_print", &menu);
|
||||||
|
|
||||||
if (!gcode(Template).empty())
|
if (!gcode(Template).empty())
|
||||||
append_menu_item(&menu, wxID_ANY, _L("Add custom template") + " (" + gcode(Template) + ")", "",
|
append_menu_item(&menu, wxID_ANY, _L("Add custom template") + " (" + gcode(Template) + ")", "",
|
||||||
|
@ -44,10 +44,13 @@ static void activate_options_tab(std::shared_ptr<ConfigOptionsGroup> optgroup)
|
|||||||
|
|
||||||
void PreferencesDialog::build()
|
void PreferencesDialog::build()
|
||||||
{
|
{
|
||||||
|
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||||
|
const wxFont& font = wxGetApp().normal_font();
|
||||||
|
SetFont(font);
|
||||||
|
|
||||||
auto app_config = get_app_config();
|
auto app_config = get_app_config();
|
||||||
|
|
||||||
wxNotebook* tabs = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME);
|
wxNotebook* tabs = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME);
|
||||||
tabs->SetFont(wxGetApp().normal_font());
|
|
||||||
|
|
||||||
// Add "General" tab
|
// Add "General" tab
|
||||||
m_optgroup_general = create_options_tab(_L("General"), tabs);
|
m_optgroup_general = create_options_tab(_L("General"), tabs);
|
||||||
@ -328,12 +331,12 @@ void PreferencesDialog::build()
|
|||||||
#endif // ENABLE_ENVIRONMENT_MAP
|
#endif // ENABLE_ENVIRONMENT_MAP
|
||||||
|
|
||||||
auto sizer = new wxBoxSizer(wxVERTICAL);
|
auto sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
sizer->Add(tabs, 1, wxEXPAND);
|
sizer->Add(tabs, 1, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5);
|
||||||
|
|
||||||
auto buttons = CreateStdDialogButtonSizer(wxOK | wxCANCEL);
|
auto buttons = CreateStdDialogButtonSizer(wxOK | wxCANCEL);
|
||||||
wxButton* btn = static_cast<wxButton*>(FindWindowById(wxID_OK, this));
|
wxButton* btn = static_cast<wxButton*>(FindWindowById(wxID_OK, this));
|
||||||
btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { accept(); });
|
btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { accept(); });
|
||||||
sizer->Add(buttons, 0, wxALIGN_CENTER_HORIZONTAL | wxBOTTOM| wxTOP, 10);
|
sizer->Add(buttons, 0, wxALIGN_CENTER_HORIZONTAL | wxBOTTOM | wxTOP, 10);
|
||||||
|
|
||||||
SetSizer(sizer);
|
SetSizer(sizer);
|
||||||
sizer->SetSizeHints(this);
|
sizer->SetSizeHints(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user