Merge prusa 2.6.1

This commit is contained in:
QIDI TECH
2023-09-16 16:26:29 +08:00
parent 1338e60f8b
commit 963e22db99
203 changed files with 25254 additions and 6453 deletions

View File

@@ -707,6 +707,10 @@ PageMaterials::PageMaterials(ConfigWizard *parent, Materials *materials, wxStrin
list_vendor->SetMinSize(wxSize(13*em, list_h));
list_profile->SetMinSize(wxSize(23*em, list_h));
#ifdef __APPLE__
for (wxWindow* win : std::initializer_list<wxWindow*>{ list_printer, list_type, list_vendor, list_profile })
win->SetBackgroundColour(wxGetApp().get_window_default_clr());
#endif
grid = new wxFlexGridSizer(4, em/2, em);
@@ -817,19 +821,9 @@ void PageMaterials::reload_presets()
void PageMaterials::set_compatible_printers_html_window(const std::vector<std::string>& printer_names, bool all_printers)
{
const auto bgr_clr =
#if defined(__APPLE__)
html_window->GetParent()->GetBackgroundColour();
#else
#if defined(_WIN32)
wxGetApp().get_window_default_clr();
#else
wxSystemSettings::GetColour(wxSYS_COLOUR_MENU);
#endif
#endif
const auto text_clr = wxGetApp().get_label_clr_default();
const auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
const auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
const auto bgr_clr_str = wxGetApp().get_html_bg_color(parent);
wxString text;
if (materials->technology == T_FFF && template_shown) {
// TRN ConfigWizard: Materials : "%1%" = "Filaments"/"SLA materials"
@@ -1468,11 +1462,41 @@ PageDownloader::PageDownloader(ConfigWizard* parent)
box_allow_downloads->SetValue(box_allow_value);
append(box_allow_downloads);
// TRN ConfigWizard : Downloader : %1% = "QIDISlicer"
append_text(format_wxstr(_L("If enabled, %1% registers to start on custom URL on www.printables.com."
" You will be able to use button with %1% logo to open models in this %1%."
" The model will be downloaded into folder you choose bellow."
), SLIC3R_APP_NAME));
// append info line with link on qidi3d.com
{
const int em = parent->em_unit();
wxHtmlWindow* html_window = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxSize(60 * em, 5 * em), wxHW_SCROLLBAR_NEVER);
html_window->Bind(wxEVT_HTML_LINK_CLICKED, [](wxHtmlLinkEvent& event) {
wxGetApp().open_browser_with_warning_dialog(event.GetLinkInfo().GetHref());
event.Skip(false);
});
append(html_window);
const auto text_clr = wxGetApp().get_label_clr_default();
const auto bgr_clr_str = wxGetApp().get_html_bg_color(parent);
const auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
const wxString link = format_wxstr("<a href = \"%1%\">%1%</a>", "qidi3d.com");
const wxString main_text = format_wxstr(_L("You can get more information about the printer from the %1% "
), link, SLIC3R_APP_NAME);
const wxFont& font = this->GetFont();
const int fs = font.GetPointSize();
int size[] = { fs,fs,fs,fs,fs,fs,fs };
html_window->SetFonts(font.GetFaceName(), font.GetFaceName(), size);
html_window->SetPage(format_wxstr(
"<html><body bgcolor=%1% link=%2%>"
"<font color=%2% size=\"3\">%3%</font>"
"</body></html>"
, bgr_clr_str
, text_clr_str
, main_text
));
}
#ifdef __linux__
append_text(wxString::Format(_L(
@@ -1608,6 +1632,7 @@ PageReloadFromDisk::PageReloadFromDisk(ConfigWizard* parent)
PageFilesAssociation::PageFilesAssociation(ConfigWizard* parent)
: ConfigWizardPage(parent, _L("Files association"), _L("Files association"))
{
//Y
cb_3mf = new wxCheckBox(this, wxID_ANY, _L("Associate .3mf files to QIDISlicer"));
cb_stl = new wxCheckBox(this, wxID_ANY, _L("Associate .stl files to QIDISlicer"));
cb_step = new wxCheckBox(this, wxID_ANY, _L("Associate .step/.stp files to QIDISlicer"));
@@ -3270,6 +3295,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
#ifdef _WIN32
app_config->set("associate_3mf", page_files_association->associate_3mf() ? "1" : "0");
app_config->set("associate_stl", page_files_association->associate_stl() ? "1" : "0");
//Y
app_config->set("associate_step", page_files_association->associate_step() ? "1" : "0");
// app_config->set("associate_gcode", page_files_association->associate_gcode() ? "1" : "0");
@@ -3360,6 +3386,9 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
: DPIDialog(parent, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(name()), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
, p(new priv(this))
{
#ifdef __APPLE__
this->SetBackgroundColour(wxGetApp().get_window_default_clr());
#endif
wxBusyCursor wait;
this->SetFont(wxGetApp().normal_font());