FIX:image alignment

jira:[STUDIO-14555][STUDIO-14125]

Change-Id: Iefd35c16fce9396d54bcb847291094346f987b28
(cherry picked from commit 2f1d921d8d76bc0235eca139801a106fca3c3cf6)
This commit is contained in:
milk
2025-09-11 16:16:06 +08:00
committed by Noisyfox
parent 6724ec56ba
commit 837d2af7e0
22 changed files with 31 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -9,9 +9,11 @@
#include "slic3r/GUI/I18N.hpp"
#include "slic3r/GUI/wxExtensions.hpp"
#include "slic3r/GUI/Widgets/Label.hpp"
#include <wx/stattext.h>
#define MODEL_STR L("Model:")
#define SERIAL_STR L("Serial:")
#define VERSION_STR L("Version:")
@@ -64,45 +66,47 @@ void uiDeviceUpdateVersion::SetVersion(const wxString& cur_version, const wxStri
void uiDeviceUpdateVersion::CreateWidgets()
{
m_dev_name = new wxStaticText(this, wxID_ANY, "_");
m_dev_snl = new wxStaticText(this, wxID_ANY, "_");
m_dev_version = new wxStaticText(this, wxID_ANY, "_");
m_dev_name = new wxStaticText(this, wxID_ANY, "-");
m_dev_snl = new wxStaticText(this, wxID_ANY, "-");
m_dev_version = new wxStaticText(this, wxID_ANY, "-");
wxStaticText* serial_text = new wxStaticText(this, wxID_ANY, _L(SERIAL_STR));
wxStaticText* version_text = new wxStaticText(this, wxID_ANY, _L(VERSION_STR));
wxStaticText *model_text = new wxStaticText(this, wxID_ANY, _L(MODEL_STR));
// Use bold font
wxFont font = this->GetFont();
wxFont font = Label::Head_14;
font.SetWeight(wxFONTWEIGHT_BOLD);
m_dev_name->SetFont(font);
serial_text->SetFont(font);
version_text->SetFont(font);
model_text->SetFont(font);
// The grid sizer
wxFlexGridSizer* grid_sizer = new wxFlexGridSizer(2, 3, 0, 0);
wxFlexGridSizer* grid_sizer = new wxFlexGridSizer(0, 2, 0, 0);
//grid_sizer->AddGrowableCol(1);
grid_sizer->SetFlexibleDirection(wxHORIZONTAL);
grid_sizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
grid_sizer->Add(model_text, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
grid_sizer->Add(m_dev_name, 0, wxALL | wxEXPAND, FromDIP(5));
grid_sizer->Add(serial_text, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
grid_sizer->Add(m_dev_snl, 0, wxALIGN_LEFT | wxALL, FromDIP(5));
grid_sizer->Add(0, 0, wxALL, wxEXPAND);
grid_sizer->Add(m_dev_snl, 0, wxALL | wxEXPAND, FromDIP(5));
m_dev_upgrade_indicator = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(FromDIP(5), FromDIP(5)));
m_dev_upgrade_indicator->SetBitmap(ScalableBitmap(this, "monitor_upgrade_online", 5).bmp());
wxBoxSizer* version_hsizer = new wxBoxSizer(wxHORIZONTAL);
version_hsizer->Add(m_dev_upgrade_indicator, 0, wxALL, FromDIP(5));
version_hsizer->Add(version_text, 0, wxLEFT | wxBOTTOM|wxALIGN_RIGHT, FromDIP(5));
grid_sizer->Add(version_hsizer, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
grid_sizer->Add(m_dev_version, 0, wxALIGN_LEFT | wxALL, FromDIP(5));
grid_sizer->Add(0, 0, wxALL, wxEXPAND);
version_hsizer->Add(0, 0, 1, wxEXPAND, 0);
version_hsizer->Add(m_dev_upgrade_indicator, 0, wxALIGN_CENTER_VERTICAL | wxALL, FromDIP(5));
version_hsizer->Add(version_text, 0, wxALL, FromDIP(5));
grid_sizer->Add(version_hsizer, 0, wxEXPAND, 0);
grid_sizer->Add(m_dev_version, 0, wxEXPAND | wxALL, FromDIP(5));
// Updating
wxSizer* main_sizer = new wxBoxSizer(wxVERTICAL);
main_sizer->AddSpacer(FromDIP(20));
main_sizer->Add(m_dev_name, 0, wxALIGN_LEFT | wxALL, FromDIP(5));
main_sizer->AddSpacer(FromDIP(40));
main_sizer->Add(grid_sizer, 0, wxALIGN_LEFT, FromDIP(5));
SetSizer(main_sizer);

View File

@@ -433,9 +433,9 @@ void MachineInfoPanel::msw_rescale()
void MachineInfoPanel::init_bitmaps()
{
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_printer = ScalableBitmap(this, "printer_thumbnail_png", 160);
m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams_png", 150);
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_png", 160);
@@ -686,6 +686,7 @@ void MachineInfoPanel::update_ams_ext(MachineObject *obj)
amspanel->Hide();
}
m_ahb_panel->Show();
wxString hub_sn = "-";
@@ -1025,7 +1026,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_png", 160);
m_img_monitor_ams = ScalableBitmap(this, "monitor_upgrade_ams_png", 150);
m_ams_img->SetBitmap(m_img_monitor_ams.bmp());
}
} else if (contain_one_slot) {
@@ -1522,6 +1523,10 @@ bool UpgradePanel::Show(bool show)
ams_sizer->SetFlexibleDirection(wxHORIZONTAL);
ams_sizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
m_staticText_ams_model_id = new wxStaticText(this, wxID_ANY, _L("Model:"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_ams_model_id->Wrap(-1);
m_staticText_ams_model_id->SetFont(Label::Head_14);
m_staticText_ams = new wxStaticText(this, wxID_ANY, "-", wxDefaultPosition, wxDefaultSize, 0);
m_staticText_ams->SetForegroundColour("#262E30");
m_staticText_ams->SetFont(Label::Head_14);
@@ -1564,8 +1569,8 @@ bool UpgradePanel::Show(bool show)
content_info->Add(m_staticText_ams_ver_val, 0, wxALL | wxEXPAND, FromDIP(5));
content_info->Add(m_staticText_beta_version, 0, wxALL | wxEXPAND, FromDIP(5));
ams_sizer->Add(m_staticText_ams, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
ams_sizer->Add(0, 0, 1, wxEXPAND, 5);
ams_sizer->Add(m_staticText_ams_model_id, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
ams_sizer->Add(m_staticText_ams, 0, wxALL, FromDIP(5));
ams_sizer->Add(m_staticText_ams_sn, 0, wxALIGN_RIGHT | wxALL, FromDIP(5));
ams_sizer->Add(m_staticText_ams_sn_val, 0, wxALL | wxEXPAND, FromDIP(5));
ams_sizer->Add(m_ams_ver_sizer, 1, wxEXPAND, FromDIP(5));

View File

@@ -38,6 +38,7 @@ public:
class AmsPanel : public wxPanel
{
public:
wxStaticText *m_staticText_ams_model_id;
wxStaticText *m_staticText_ams;
wxStaticText *m_staticText_ams_sn_val;
wxStaticText *m_staticText_ams_ver_val;