diff --git a/resources/images/air_pump.png b/resources/images/air_pump.png
new file mode 100644
index 0000000000..887f70701f
Binary files /dev/null and b/resources/images/air_pump.png differ
diff --git a/resources/images/air_pump.svg b/resources/images/air_pump.svg
deleted file mode 100644
index 799588ec2e..0000000000
--- a/resources/images/air_pump.svg
+++ /dev/null
@@ -1,396 +0,0 @@
-
diff --git a/resources/images/cut.png b/resources/images/cut.png
new file mode 100644
index 0000000000..01bf818b30
Binary files /dev/null and b/resources/images/cut.png differ
diff --git a/resources/images/cut.svg b/resources/images/cut.svg
deleted file mode 100644
index f04edf7b39..0000000000
--- a/resources/images/cut.svg
+++ /dev/null
@@ -1,177 +0,0 @@
-
diff --git a/resources/images/extra_icon_png.png b/resources/images/extra_icon_png.png
new file mode 100644
index 0000000000..13e461eb2e
Binary files /dev/null and b/resources/images/extra_icon_png.png differ
diff --git a/resources/images/laser.png b/resources/images/laser.png
new file mode 100644
index 0000000000..98896453d6
Binary files /dev/null and b/resources/images/laser.png differ
diff --git a/resources/images/laser.svg b/resources/images/laser.svg
deleted file mode 100644
index 7380a6d806..0000000000
--- a/resources/images/laser.svg
+++ /dev/null
@@ -1,249 +0,0 @@
-
diff --git a/resources/images/laser_40.png b/resources/images/laser_40.png
new file mode 100644
index 0000000000..74909d116e
Binary files /dev/null and b/resources/images/laser_40.png differ
diff --git a/resources/images/monitor_upgrade_ams_png.png b/resources/images/monitor_upgrade_ams_png.png
new file mode 100644
index 0000000000..d043ad3738
Binary files /dev/null and b/resources/images/monitor_upgrade_ams_png.png differ
diff --git a/resources/images/monitor_upgrade_n3s.png b/resources/images/monitor_upgrade_n3s.png
new file mode 100644
index 0000000000..352f5f6771
Binary files /dev/null and b/resources/images/monitor_upgrade_n3s.png differ
diff --git a/resources/images/monitor_upgrade_n3s.svg b/resources/images/monitor_upgrade_n3s.svg
deleted file mode 100644
index 39a1d08665..0000000000
--- a/resources/images/monitor_upgrade_n3s.svg
+++ /dev/null
@@ -1,137 +0,0 @@
-
diff --git a/resources/images/printer_thumbnail_h2d_png.png b/resources/images/printer_thumbnail_h2d_png.png
new file mode 100644
index 0000000000..12c268ad32
Binary files /dev/null and b/resources/images/printer_thumbnail_h2d_png.png differ
diff --git a/resources/images/printer_thumbnail_n1_png.png b/resources/images/printer_thumbnail_n1_png.png
new file mode 100644
index 0000000000..0ed185030e
Binary files /dev/null and b/resources/images/printer_thumbnail_n1_png.png differ
diff --git a/resources/images/printer_thumbnail_n2s_png.png b/resources/images/printer_thumbnail_n2s_png.png
new file mode 100644
index 0000000000..a886f834e4
Binary files /dev/null and b/resources/images/printer_thumbnail_n2s_png.png differ
diff --git a/resources/images/printer_thumbnail_o1e_png.png b/resources/images/printer_thumbnail_o1e_png.png
new file mode 100644
index 0000000000..a9d65753ac
Binary files /dev/null and b/resources/images/printer_thumbnail_o1e_png.png differ
diff --git a/resources/images/printer_thumbnail_p1p_png.png b/resources/images/printer_thumbnail_p1p_png.png
new file mode 100644
index 0000000000..6aa9bd1093
Binary files /dev/null and b/resources/images/printer_thumbnail_p1p_png.png differ
diff --git a/resources/images/printer_thumbnail_p1s_png.png b/resources/images/printer_thumbnail_p1s_png.png
new file mode 100644
index 0000000000..48b3bd33c6
Binary files /dev/null and b/resources/images/printer_thumbnail_p1s_png.png differ
diff --git a/resources/images/printer_thumbnail_png.png b/resources/images/printer_thumbnail_png.png
new file mode 100644
index 0000000000..50c881cbec
Binary files /dev/null and b/resources/images/printer_thumbnail_png.png differ
diff --git a/resources/images/printer_thumbnail_x1c_png.png b/resources/images/printer_thumbnail_x1c_png.png
new file mode 100644
index 0000000000..5d6d7a315d
Binary files /dev/null and b/resources/images/printer_thumbnail_x1c_png.png differ
diff --git a/resources/images/printer_thumbnail_x1e_png.png b/resources/images/printer_thumbnail_x1e_png.png
new file mode 100644
index 0000000000..d50a144ffb
Binary files /dev/null and b/resources/images/printer_thumbnail_x1e_png.png differ
diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp
index 40a807eccd..3a3b4dd32a 100644
--- a/src/slic3r/GUI/DeviceManager.cpp
+++ b/src/slic3r/GUI/DeviceManager.cpp
@@ -330,18 +330,22 @@ std::string MachineObject::get_printer_thumbnail_img_str() const
std::string img_str = DevPrinterConfigUtil::get_printer_thumbnail_img(printer_type);
std::string img_url;
- if (!img_str.empty()) {
- img_url = Slic3r::resources_dir() + "\\printers\\image\\" + img_str;
- if (fs::exists(img_url + ".svg")) {
+ if (!img_str.empty())
+ {
+ img_url = Slic3r::resources_dir() + "\\images\\" + img_str ;
+ if (fs::exists(img_url + ".svg"))
+ {
return img_url;
}
- else {
+ else
+ {
img_url = img_str;
}
- }
- else {
+ }
+ else
+ {
img_url = "printer_thumbnail";
- }
+ }
return img_url;
}
@@ -4151,7 +4155,7 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
}
catch (...) { }
}
-
+
if (check_studio_cmd && j["upgrade"].contains("err_code")) {
if (j["upgrade"]["err_code"].is_number()) {
add_command_error_code_dlg(j["upgrade"]["err_code"].get());
diff --git a/src/slic3r/GUI/UpgradePanel.cpp b/src/slic3r/GUI/UpgradePanel.cpp
index ae336de79a..842068457b 100644
--- a/src/slic3r/GUI/UpgradePanel.cpp
+++ b/src/slic3r/GUI/UpgradePanel.cpp
@@ -377,6 +377,8 @@ void MachineInfoPanel::createLaserWidgets(wxBoxSizer* main_left_sizer)
main_left_sizer->Add(m_laser_line_above, 0, wxEXPAND | wxLEFT, FromDIP(40));
m_lazer_img = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(FromDIP(200), FromDIP(200)));
+
+
m_lazer_img->SetBitmap(m_img_laser.bmp());
wxBoxSizer* content_sizer = new wxBoxSizer(wxVERTICAL);
@@ -430,25 +432,29 @@ void MachineInfoPanel::msw_rescale()
void MachineInfoPanel::init_bitmaps()
{
- m_img_printer = ScalableBitmap(this, "printer_thumbnail", 160);
- m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams", 160);
- m_img_ext = ScalableBitmap(this, "monitor_upgrade_ext", 160);
- if (wxGetApp().dark_mode()) {
- m_img_air_pump = ScalableBitmap(this, "air_pump_dark", 160);
- m_img_extra_ams = ScalableBitmap(this, "extra_icon_dark", 160);
- }
- else {
+ try {
+ m_img_printer = ScalableBitmap(this, "printer_thumbnail_png", 160);
+ m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams_png", 160);
+ m_img_ext = ScalableBitmap(this, "monitor_upgrade_ext", 160);
+
m_img_air_pump = ScalableBitmap(this, "air_pump", 160);
- m_img_extra_ams = ScalableBitmap(this, "extra_icon", 160);
+ m_img_extra_ams = ScalableBitmap(this, "extra_icon_png", 160);
+
+ m_img_laser = ScalableBitmap(this, "laser", 160);
+ m_img_cutting = ScalableBitmap(this, "cut", 160);
+ m_img_extinguish = ScalableBitmap(this, "extinguish", 160);
+
+ upgrade_green_icon = ScalableBitmap(this, "monitor_upgrade_online", 5);
+ upgrade_gray_icon = ScalableBitmap(this, "monitor_upgrade_offline", 5);
+ upgrade_yellow_icon = ScalableBitmap(this, "monitor_upgrade_busy", 5);
+ }
+ catch (const std::exception &e)
+ {
+ BOOST_LOG_TRIVIAL(error) << "init_bitmaps failed to load resources: " << e.what();
+ } catch (...)
+ {
+ BOOST_LOG_TRIVIAL(error) << "init_bitmaps failed to load resources: unknown error";
}
-
- m_img_laser = ScalableBitmap(this, "laser", 160);
- m_img_cutting = ScalableBitmap(this, "cut", 160);
- m_img_extinguish = ScalableBitmap(this, "extinguish", 160);
-
- upgrade_green_icon = ScalableBitmap(this, "monitor_upgrade_online", 5);
- upgrade_gray_icon = ScalableBitmap(this, "monitor_upgrade_offline", 5);
- upgrade_yellow_icon = ScalableBitmap(this, "monitor_upgrade_busy", 5);
}
void MachineInfoPanel::rescale_bitmaps()
@@ -478,21 +484,25 @@ void MachineInfoPanel::update_printer_imgs(MachineObject* obj)
{
if (!obj) {return;}
auto img = obj->get_printer_thumbnail_img_str();
- if (wxGetApp().dark_mode()) {
- img += "_dark";
- m_img_extra_ams = ScalableBitmap(this, "extra_icon_dark", 160);
+ img += "_png";
+
+ try
+ {
+ m_img_extra_ams = ScalableBitmap(this, "extra_icon_png", 160);
+ m_img_printer = ScalableBitmap(this, img, 160);
+ m_printer_img->SetBitmap(m_img_printer.bmp());
+ m_printer_img->Refresh();
+ m_extra_ams_img->SetBitmap(m_img_extra_ams.bmp());
+ m_extra_ams_img->Refresh();
}
- else {
- m_img_extra_ams = ScalableBitmap(this, "extra_icon", 160);
-
+ catch (const std::exception &e)
+ {
+ BOOST_LOG_TRIVIAL(error) << "update_printer_imgs error : " << e.what();
+ }
+ catch (...)
+ {
+ BOOST_LOG_TRIVIAL(error) << "update_printer_imgs failed: unknown error";
}
-
- m_img_printer = ScalableBitmap(this, img, 160);
- m_printer_img->SetBitmap(m_img_printer.bmp());
- m_printer_img->Refresh();
- m_extra_ams_img->SetBitmap(m_img_extra_ams.bmp());
- m_extra_ams_img->Refresh();
-
}
void MachineInfoPanel::update(MachineObject* obj)
@@ -1015,7 +1025,7 @@ void MachineInfoPanel::update_ams_ext(MachineObject *obj)
if (contain_four_slot) {
if (m_img_monitor_ams.name() != "monitor_upgrade_ams") {
- m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams", 160);
+ m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams_png", 160);
m_ams_img->SetBitmap(m_img_monitor_ams.bmp());
}
} else if (contain_one_slot) {
@@ -1060,6 +1070,26 @@ void MachineInfoPanel::update_laszer(MachineObject* obj)
if (obj && obj->laser_version_info.isValid())
{
m_laser_version->UpdateInfo(obj->laser_version_info);
+
+ std::string current_product_name = obj->laser_version_info.product_name.ToStdString();
+
+ if (m_last_laser_product_name != current_product_name) {
+ std::string laser_image_name = "laser";
+
+ if (current_product_name.find("10W") != std::string::npos) {
+ laser_image_name = "laser";
+ } else if (current_product_name.find("40W") != std::string::npos) {
+ laser_image_name = "laser_40";
+ }
+
+ m_img_laser = ScalableBitmap(this, laser_image_name, 160);
+ if (m_lazer_img) {
+ m_lazer_img->SetBitmap(m_img_laser.bmp());
+ m_lazer_img->Refresh();
+ }
+
+ m_last_laser_product_name = current_product_name;
+ }
show_laszer(true);
}
else
diff --git a/src/slic3r/GUI/UpgradePanel.hpp b/src/slic3r/GUI/UpgradePanel.hpp
index f16a7db23c..b405e770bf 100644
--- a/src/slic3r/GUI/UpgradePanel.hpp
+++ b/src/slic3r/GUI/UpgradePanel.hpp
@@ -52,11 +52,11 @@ public:
long style = wxTAB_TRAVERSAL,
const wxString &name = wxEmptyString);
~AmsPanel();
-
+
void msw_rescale();
};
-class ExtraAmsPanel : public AmsPanel
+class ExtraAmsPanel : public AmsPanel
{
public:
ExtraAmsPanel(wxWindow* parent,
@@ -159,6 +159,8 @@ protected:
int last_status = -1;
std::string last_status_str = "";
+ std::string m_last_laser_product_name = "";
+
SecondaryCheckDialog* confirm_dlg = nullptr;
void upgrade_firmware_internal();