mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
ENH:update SyncAmsInfoDialog
jira: none Change-Id: I7549dd3334fd9bcc4eba5d3b41786516fd879f38 (cherry picked from commit 9b1717fa56b1d5baacc3801f23d1586050970574)
This commit is contained in:
@@ -187,7 +187,7 @@ void AppConfig::set_defaults()
|
||||
if (get("enable_append_color_by_sync_ams").empty())
|
||||
set_bool("enable_append_color_by_sync_ams", false);
|
||||
if (get("enable_merge_color_by_sync_ams").empty())
|
||||
set_bool("enable_merge_color_by_sync_ams", true);
|
||||
set_bool("enable_merge_color_by_sync_ams", false);
|
||||
|
||||
if (get("camera_orbit_mult").empty())
|
||||
set("camera_orbit_mult", "1.0");
|
||||
|
||||
@@ -354,13 +354,13 @@ AmsMapingPopup::AmsMapingPopup(wxWindow *parent)
|
||||
m_right_extra_slot->SetMinSize(wxSize(FromDIP(48), FromDIP(60)));
|
||||
m_right_extra_slot->SetMaxSize(wxSize(FromDIP(48), FromDIP(60)));
|
||||
|
||||
m_sizer_ams_left->Add(create_split_sizer(m_left_marea_panel, _L("Left Ams")), 0, wxEXPAND, 0);
|
||||
m_sizer_ams_left->Add(create_split_sizer(m_left_marea_panel, _L("Left AMS")), 0, wxEXPAND, 0);
|
||||
m_sizer_ams_left->Add(m_sizer_ams_basket_left, 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
m_sizer_ams_left->Add(create_split_sizer(m_left_marea_panel, _L("External")), 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
//m_sizer_ams_left->Add(m_left_extra_slot, 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
m_sizer_ams_left->Add(sizer_temp, 0, wxEXPAND | wxTOP, FromDIP(8));
|
||||
|
||||
m_right_split_ams_sizer = create_split_sizer(m_right_marea_panel, _L("Right Ams"));
|
||||
m_right_split_ams_sizer = create_split_sizer(m_right_marea_panel, _L("Right AMS"));
|
||||
m_sizer_ams_right->Add(m_right_split_ams_sizer, 0, wxEXPAND, 0);
|
||||
m_sizer_ams_right->Add(m_sizer_ams_basket_right, 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
m_sizer_ams_right->Add(create_split_sizer(m_right_marea_panel, _L("External")), 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
@@ -574,7 +574,7 @@ void AmsMapingPopup::update(MachineObject* obj)
|
||||
else if (m_show_type == ShowType::RIGHT)
|
||||
{
|
||||
m_right_marea_panel->Show();
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("Right Ams"));
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("Right AMS"));
|
||||
m_right_extra_slot->Show();
|
||||
}
|
||||
else if (m_show_type == ShowType::LEFT_AND_RIGHT)
|
||||
@@ -584,7 +584,7 @@ void AmsMapingPopup::update(MachineObject* obj)
|
||||
m_left_marea_panel->Show();
|
||||
m_left_extra_slot->Show();
|
||||
m_right_marea_panel->Show();
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("Right Ams"));
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("Right AMS"));
|
||||
m_right_extra_slot->Show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2652,8 +2652,11 @@ void Sidebar::update_sync_status(const MachineObject *obj)
|
||||
void Sidebar::load_ams_list(std::string const &device, MachineObject* obj)
|
||||
{
|
||||
std::map<int, DynamicPrintConfig> filament_ams_list = build_filament_ams_list(obj);
|
||||
|
||||
p->ams_list_device = device;
|
||||
bool device_change = false;
|
||||
if (p->ams_list_device != device) {
|
||||
p->ams_list_device = device;
|
||||
device_change = true;
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": %1% items") % filament_ams_list.size();
|
||||
if (wxGetApp().preset_bundle->filament_ams_list == filament_ams_list)
|
||||
return;
|
||||
@@ -2661,7 +2664,9 @@ void Sidebar::load_ams_list(std::string const &device, MachineObject* obj)
|
||||
|
||||
for (auto c : p->combos_filament){
|
||||
c->update();
|
||||
c->ShowBadge(false);//change printer,then clear badge
|
||||
if (device_change) {
|
||||
c->ShowBadge(false);//change printer,then clear badge
|
||||
}
|
||||
}
|
||||
|
||||
p->combo_printer->update();
|
||||
|
||||
@@ -1767,7 +1767,7 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusAmsMappingMixInvalid) {
|
||||
wxString msg_text = _L("Please do not mix-use the Ext with Ams");
|
||||
wxString msg_text = _L("Please do not mix-use the Ext with AMS");
|
||||
update_print_status_msg(msg_text, true, false);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
|
||||
@@ -1245,13 +1245,13 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
bSizer_button->AddStretchSpacer(1);
|
||||
StateColor btn_bg_green(std::pair<wxColour, int>(wxColour(27, 136, 68), StateColor::Pressed), std::pair<wxColour, int>(wxColour(61, 203, 115), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(AMS_CONTROL_BRAND_COLOUR, StateColor::Normal));
|
||||
m_button_ok = new Button(this, _L("OK"));
|
||||
m_button_ok = new Button(this, _L("Synchronize now"));
|
||||
m_button_ok->SetBackgroundColor(btn_bg_green);
|
||||
m_button_ok->SetBorderColor(*wxWHITE);
|
||||
m_button_ok->SetTextColor(wxColour(0xFFFFFE));
|
||||
m_button_ok->SetFont(Label::Body_12);
|
||||
m_button_ok->SetSize(BUTTON_SIZE);
|
||||
m_button_ok->SetMinSize(BUTTON_SIZE);
|
||||
m_button_ok->SetSize(wxSize(FromDIP(90), FromDIP(24)));
|
||||
m_button_ok->SetMinSize(wxSize(FromDIP(90), FromDIP(24)));
|
||||
m_button_ok->SetCornerRadius(FromDIP(12));
|
||||
bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
|
||||
|
||||
@@ -1264,7 +1264,7 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
StateColor btn_bg_white(std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed), std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(*wxWHITE, StateColor::Normal));
|
||||
|
||||
m_button_cancel = new Button(this, _L("Cancel"));
|
||||
m_button_cancel = new Button(this, m_input_info.cancel_text_to_later ? _L("Later") :_L("Cancel"));
|
||||
m_button_cancel->SetBackgroundColor(btn_bg_white);
|
||||
m_button_cancel->SetBorderColor(wxColour(38, 46, 48));
|
||||
m_button_cancel->SetFont(Label::Body_12);
|
||||
@@ -2109,7 +2109,7 @@ void SyncAmsInfoDialog::show_status(PrintDialogStatus status, std::vector<wxStri
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusAmsMappingMixInvalid) {
|
||||
wxString msg_text = _L("Please do not mix-use the Ext with Ams");
|
||||
wxString msg_text = _L("Please do not mix-use the Ext with AMS");
|
||||
update_print_status_msg(msg_text, true, false);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
|
||||
@@ -229,6 +229,7 @@ public:
|
||||
{
|
||||
bool connected_printer = false;
|
||||
bool first_sync = false;
|
||||
bool cancel_text_to_later = false;
|
||||
};
|
||||
struct SyncResult
|
||||
{
|
||||
|
||||
@@ -124,14 +124,15 @@ void ComboBox::SetLabel(const wxString &value)
|
||||
else {
|
||||
if (is_replace_text_to_image) {
|
||||
auto new_value = value;
|
||||
new_value.Replace(replace_text, "", false);//replace first text
|
||||
TextInput::SetIcon_1(image_for_text);
|
||||
TextInput::SetLabel(new_value);
|
||||
}
|
||||
else {
|
||||
TextInput::SetIcon_1("");
|
||||
TextInput::SetLabel(value);
|
||||
if (new_value.starts_with(replace_text)) {
|
||||
new_value.Replace(replace_text, "", false); // replace first text
|
||||
TextInput::SetIcon_1(image_for_text);
|
||||
TextInput::SetLabel(new_value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
TextInput::SetIcon_1("");
|
||||
TextInput::SetLabel(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ void TextInput::SetIcon_1(const wxString &icon) {
|
||||
this->icon_1 = ScalableBitmap();
|
||||
return;
|
||||
}
|
||||
this->icon_1 = ScalableBitmap(this, icon.ToStdString(), 16);
|
||||
this->icon_1 = ScalableBitmap(this, icon.ToStdString(), 14);
|
||||
Rescale();
|
||||
}
|
||||
|
||||
@@ -238,6 +238,7 @@ void TextInput::render(wxDC& dc)
|
||||
if (pt.x * 2 + szIcon.x + 0 + labelSize.x < size.x)
|
||||
pt.x = (size.x - (szIcon.x + 0 + labelSize.x)) / 2;
|
||||
}
|
||||
pt.x += szIcon.x / 4.f;
|
||||
dc.DrawBitmap(icon_1.bmp(), pt);
|
||||
pt.x += szIcon.x + 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user