|
|
|
|
@@ -426,7 +426,7 @@ wxBoxSizer *PreferencesDialog::create_item_input(wxString title, wxString title2
|
|
|
|
|
wxBoxSizer *PreferencesDialog::create_item_backup_input(wxString title, wxWindow *parent, wxString tooltip, std::string param)
|
|
|
|
|
{
|
|
|
|
|
wxBoxSizer *m_sizer_input = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
|
auto input_title = new wxStaticText(parent, wxID_ANY, title, wxDefaultPosition, DESIGN_TITLE_SIZE, 0);
|
|
|
|
|
auto input_title = new wxStaticText(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, 0);
|
|
|
|
|
input_title->SetForegroundColour(DESIGN_GRAY900_COLOR);
|
|
|
|
|
input_title->SetFont(::Label::Body_13);
|
|
|
|
|
input_title->SetToolTip(tooltip);
|
|
|
|
|
@@ -591,7 +591,7 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxWindow *pa
|
|
|
|
|
checkbox_title->SetFont(::Label::Body_13);
|
|
|
|
|
|
|
|
|
|
auto size = checkbox_title->GetTextExtent(title);
|
|
|
|
|
checkbox_title->SetMinSize(wxSize(size.x + FromDIP(40), -1));
|
|
|
|
|
checkbox_title->SetMinSize(wxSize(size.x + FromDIP(4), -1));
|
|
|
|
|
checkbox_title->Wrap(-1);
|
|
|
|
|
m_sizer_checkbox->Add(checkbox_title, 0, wxALIGN_CENTER | wxALL, 3);
|
|
|
|
|
|
|
|
|
|
@@ -691,6 +691,7 @@ wxBoxSizer *PreferencesDialog::create_item_button(wxString title, wxString title
|
|
|
|
|
m_button_download->SetMinSize(wxSize(FromDIP(58), FromDIP(22)));
|
|
|
|
|
m_button_download->SetSize(wxSize(FromDIP(58), FromDIP(22)));
|
|
|
|
|
m_button_download->SetCornerRadius(FromDIP(12));
|
|
|
|
|
m_button_download->SetToolTip(tooltip);
|
|
|
|
|
|
|
|
|
|
m_button_download->Bind(wxEVT_BUTTON, [this, onclick](auto &e) { onclick(); });
|
|
|
|
|
|
|
|
|
|
@@ -917,6 +918,7 @@ wxWindow* PreferencesDialog::create_general_page()
|
|
|
|
|
|
|
|
|
|
auto title_presets = create_item_title(_L("Presets"), page, _L("Presets"));
|
|
|
|
|
auto item_user_sync = create_item_checkbox(_L("Auto sync user presets(Printer/Filament/Process)"), page, _L("User Sync"), 50, "sync_user_preset");
|
|
|
|
|
auto item_system_sync = create_item_checkbox(_L("Auto sync system presets(Printer/Filament/Process)"), page, _L("System Sync"), 50, "sync_system_preset");
|
|
|
|
|
auto item_save_presets = create_item_button(_L("Clear my choice on the unsaved presets."), _L("Clear"), page, _L("Clear my choice on the unsaved presets."), []() {
|
|
|
|
|
wxGetApp().app_config->set("save_preset_choise", "");
|
|
|
|
|
});
|
|
|
|
|
@@ -933,9 +935,9 @@ wxWindow* PreferencesDialog::create_general_page()
|
|
|
|
|
_L("If enabled, sets BambuStudio as default application to open .step files"), 50, "associate_step");
|
|
|
|
|
#endif // _WIN32
|
|
|
|
|
|
|
|
|
|
auto title_modelmall = create_item_title(_L("Model Mall"), page, _L("Model Mall"));
|
|
|
|
|
auto title_modelmall = create_item_title(_L("Online Models"), page, _L("Online Models"));
|
|
|
|
|
// auto item_backup = create_item_switch(_L("Backup switch"), page, _L("Backup switch"), "units");
|
|
|
|
|
auto item_modelmall = create_item_checkbox(_L("Show staff-picks"), page, _L("Show staff-picks"), 50, "staff_pick_switch");
|
|
|
|
|
auto item_modelmall = create_item_checkbox(_L("Show online staff-picked models on the home page"), page, _L("Show online staff-picked models on the home page"), 50, "staff_pick_switch");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto title_project = create_item_title(_L("Project"), page, "");
|
|
|
|
|
@@ -969,6 +971,7 @@ wxWindow* PreferencesDialog::create_general_page()
|
|
|
|
|
sizer_page->Add(item_hints, 0, wxTOP, FromDIP(3));
|
|
|
|
|
sizer_page->Add(title_presets, 0, wxTOP | wxEXPAND, FromDIP(20));
|
|
|
|
|
sizer_page->Add(item_user_sync, 0, wxTOP, FromDIP(3));
|
|
|
|
|
sizer_page->Add(item_system_sync, 0, wxTOP, FromDIP(3));
|
|
|
|
|
sizer_page->Add(item_save_presets, 0, wxTOP, FromDIP(3));
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
sizer_page->Add(title_associate_file, 0, wxTOP| wxEXPAND, FromDIP(20));
|
|
|
|
|
|