Merge: Snapmaker Orca 2.1.2

This commit is contained in:
xiaoyeliu
2025-11-17 10:04:25 +08:00
parent 737948be1f
commit e89263e51a
1147 changed files with 668188 additions and 15290 deletions

View File

@@ -18,7 +18,7 @@ AboutDialogLogo::AboutDialogLogo(wxWindow* parent)
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
{
this->SetBackgroundColour(*wxWHITE);
this->logo = ScalableBitmap(this, Slic3r::var("OrcaSlicer_192px.png"), wxBITMAP_TYPE_PNG);
this->logo = ScalableBitmap(this, Slic3r::var("Snapmaker_Orca_192px.png"), wxBITMAP_TYPE_PNG);
this->SetMinSize(this->logo.GetBmpSize());
this->Bind(wxEVT_PAINT, &AboutDialogLogo::onRepaint, this);
@@ -50,6 +50,9 @@ CopyrightsDialog::CopyrightsDialog()
this->SetFont(wxGetApp().normal_font());
this->SetBackgroundColour(*wxWHITE);
std::string icon_path = (boost::format("%1%/images/Snapmaker_OrcaTitle.ico") % resources_dir()).str();
SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
wxStaticLine *staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
auto sizer = new wxBoxSizer(wxVERTICAL);
@@ -146,9 +149,9 @@ wxString CopyrightsDialog::get_html_text()
"<font size=\"3\">",
bgr_clr_str, text_clr_str, text_clr_str,
_L("License"),
_L("Orca Slicer is licensed under "),
_L("Snapmaker Orca is licensed under "),
"https://www.gnu.org/licenses/agpl-3.0.html",_L("GNU Affero General Public License, version 3"),
_L("Orca Slicer is based on PrusaSlicer and BambuStudio"),
_L("Snapmaker Orca is Based on Orca Slicer"),
_L("Libraries"),
_L("This software uses open source components whose copyright and other proprietary rights belong to their respective owners"));
@@ -213,7 +216,10 @@ AboutDialog::AboutDialog()
SetFont(wxGetApp().normal_font());
SetBackgroundColour(*wxWHITE);
wxPanel* m_panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(FromDIP(560), FromDIP(125)), wxTAB_TRAVERSAL);
std::string icon_path = (boost::format("%1%/images/Snapmaker_OrcaTitle.ico") % resources_dir()).str();
SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
wxPanel *m_panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(FromDIP(560), FromDIP(237)), wxTAB_TRAVERSAL);
wxBoxSizer *panel_versizer = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *vesizer = new wxBoxSizer(wxVERTICAL);
@@ -226,10 +232,8 @@ AboutDialog::AboutDialog()
main_sizer->Add(m_panel, 1, wxEXPAND | wxALL, 0);
main_sizer->Add(ver_sizer, 0, wxEXPAND | wxALL, 0);
bool is_dark = wxGetApp().app_config->get("dark_color_mode") == "1";
// logo
m_logo_bitmap = ScalableBitmap(this, is_dark ? "OrcaSlicer_about_dark" : "OrcaSlicer_about", 125);
m_logo_bitmap = ScalableBitmap(this, "Snapmaker_Orca_about", 250);
m_logo = new wxStaticBitmap(this, wxID_ANY, m_logo_bitmap.bmp(), wxDefaultPosition,wxDefaultSize, 0);
m_logo->SetSizer(vesizer);
@@ -237,31 +241,34 @@ AboutDialog::AboutDialog()
// version
{
auto _build_string_font = Label::Body_12;
// _build_string_font.SetStyle(wxFONTSTYLE_ITALIC);
vesizer->Add(0, 0, 1, wxEXPAND, FromDIP(5));
auto version_string = std::string(SoftFever_VERSION); // _L("Orca Slicer ") + " " + std::string(SoftFever_VERSION);
vesizer->Add(0, FromDIP(165), 1, wxEXPAND, FromDIP(5));
auto version_string = _L("Snapmaker Orca ") + " " + std::string(Snapmaker_VERSION);
wxStaticText* version = new wxStaticText(this, wxID_ANY, version_string.c_str(), wxDefaultPosition, wxDefaultSize);
wxStaticText* credits_string = new wxStaticText(this, wxID_ANY, wxString::Format("Build %s", std::string(GIT_COMMIT_HASH)), wxDefaultPosition, wxDefaultSize);
credits_string->SetFont(_build_string_font);
wxStaticText* bs_version = new wxStaticText(this, wxID_ANY, wxString::Format("Based on Orca Slicer"), wxDefaultPosition, wxDefaultSize);
bs_version->SetFont(Label::Body_12);
wxFont version_font = GetFont();
#ifdef __WXMSW__
version_font.SetPointSize(version_font.GetPointSize()-1);
version_font.SetPointSize(version_font.GetPointSize()-1);
#else
version_font.SetPointSize(11);
#endif
version_font.SetPointSize(20);
version_font.SetPointSize(FromDIP(16));
version->SetFont(version_font);
version->SetForegroundColour(wxColour("#949494"));
credits_string->SetForegroundColour(wxColour("#949494"));
version->SetBackgroundColour(wxColour("#FFFFFF"));
credits_string->SetBackgroundColour(wxColour("#FFFFFF"));
version->SetForegroundColour(wxColour("#FFFFFD"));
bs_version->SetForegroundColour(wxColour("#FFFFFD"));
version->SetBackgroundColour(wxColour("#4d4d4d"));
bs_version->SetBackgroundColour(wxColour("#4d4d4d"));
vesizer->Add(version, 0, wxRIGHT | wxALIGN_RIGHT, FromDIP(20));
vesizer->AddSpacer(FromDIP(5));
vesizer->Add(credits_string, 0, wxRIGHT | wxALIGN_RIGHT, FromDIP(20));
vesizer->Add(version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
vesizer->Add(bs_version, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
// #if BBL_INTERNAL_TESTING
// wxString build_time = wxString::Format("Build Time: %s", std::string(SLIC3R_BUILD_TIME));
// wxStaticText* build_time_text = new wxStaticText(this, wxID_ANY, build_time, wxDefaultPosition, wxDefaultSize);
// build_time_text->SetForegroundColour(wxColour("#FFFFFE"));
// build_time_text->SetBackgroundColour(wxColour("#00AF42"));
// vesizer->Add(build_time_text, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
// #endif
vesizer->Add(0, 0, 1, wxEXPAND, FromDIP(5));
}
@@ -270,11 +277,22 @@ AboutDialog::AboutDialog()
text_sizer_horiz->Add( 0, 0, 0, wxLEFT, FromDIP(20));
std::vector<wxString> text_list;
text_list.push_back(_L("OrcaSlicer is based on BambuStudio, PrusaSlicer, and SuperSlicer."));
/*text_list.push_back(_L("Snapmaker Orca is based on BambuStudio, PrusaSlicer, and SuperSlicer."));
text_list.push_back(_L("BambuStudio is originally based on PrusaSlicer by PrusaResearch."));
text_list.push_back(_L("PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci."));
text_list.push_back(_L("Slic3r was created by Alessandro Ranellucci with the help of many other contributors."));
text_list.push_back(_L("Slic3r was created by Alessandro Ranellucci with the help of many other contributors."));*/
// SM Beta
text_list.push_back(_L("Note: The firmware version of SnapmakerU1 should be no less than") + " " + std::string(MIN_FIRM_VER));
text_list.push_back(_L("Snapmaker Orca beta is forked from Orca Slicer by SoftFever."));
text_list.push_back(_L("OrcaSlicer is forked from Bambu Studio by Bambu Lab."));
text_list.push_back(_L("Bambu Studio is forked from PrusaSlicer by Prusa Research, which is from Slic3r by Alessandro Ranellucci and the RepRap community. Orca Slicer incorporates a lot of features from SuperSlicer by @supermerill."));
text_list.push_back(_L("Snapmaker Orca integrates some features from the 3D printing open-source community, with specific attributions provided in the code comments."));
text_list.push_back(_L(""));
text_list.push_back(_L("Snapmaker Orca is licensed under the GNU Affero Generall Public License, version 3."));
text_sizer->Add( 0, 0, 0, wxTOP, FromDIP(33));
bool is_zh = wxGetApp().app_config->get("language") == "zh_CN";
for (int i = 0; i < text_list.size(); i++)
@@ -315,7 +333,7 @@ AboutDialog::AboutDialog()
copyright_hor_sizer->Add(copyright_ver_sizer, 0, wxLEFT, FromDIP(20));
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2022-2025 Li Jiang All Rights Reserved", wxDefaultPosition, wxDefaultSize);
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright (C) 2024 Snapmaker All Rights Reserved", wxDefaultPosition, wxDefaultSize);
html_text->SetForegroundColour(wxColour(107, 107, 107));
copyright_ver_sizer->Add(html_text, 0, wxALL , 0);
@@ -332,7 +350,7 @@ AboutDialog::AboutDialog()
(boost::format(
"<html>"
"<body>"
"<p style=\"text-align:left\"><a style=\"color:#009789\" href=\"https://github.com/SoftFever/Orcaslicer\">https://github.com/SoftFever/Orcaslicer</ a></p>"
"<p style=\"text-align:left\"><a style=\"color:#009789\" href=\"www.snapmaker.com\">www.snapmaker.com</ a></p>"
"</body>"
"</html>")
).str());
@@ -342,7 +360,17 @@ AboutDialog::AboutDialog()
}
//Add "Portions copyright" button
Button* button_portions = new Button(this,_L("Portions copyright"));
button_portions->SetStyle(ButtonStyle::Regular, ButtonType::Window);
StateColor report_bg(std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Disabled), std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed),
std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered), std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Enabled),
std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Normal));
button_portions->SetBackgroundColor(report_bg);
StateColor report_bd(std::pair<wxColour, int>(wxColour(144, 144, 144), StateColor::Disabled), std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Enabled));
button_portions->SetBorderColor(report_bd);
StateColor report_text(std::pair<wxColour, int>(wxColour(144, 144, 144), StateColor::Disabled), std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Enabled));
button_portions->SetTextColor(report_text);
button_portions->SetFont(Label::Body_12);
button_portions->SetCornerRadius(FromDIP(12));
button_portions->SetMinSize(wxSize(FromDIP(120), FromDIP(24)));
wxBoxSizer *copyright_button_ver = new wxBoxSizer(wxVERTICAL);
copyright_button_ver->Add( 0, 0, 0, wxTOP, FromDIP(10));