ENH: optimize set ams number popup
Change-Id: I7765b47785ee80d74d7b75701747585b6cd5db51 Jira: STUDIO-9829
This commit is contained in:
parent
7e30c8a018
commit
3573bbd985
|
@ -1,5 +1,5 @@
|
|||
<svg width="21" height="25" viewBox="0 0 21 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.68359 5.87035C2.68359 3.0074 5.00447 0.686523 7.86742 0.686523H13.4998C16.3627 0.686523 18.6836 3.0074 18.6836 5.87035V12.6865H2.68359V5.87035Z" fill="#DEDEDE"/>
|
||||
<rect x="0.683594" y="12.6865" width="20" height="12" fill="#C1C1C1"/>
|
||||
<rect x="7.68359" y="5.94824" width="6" height="12" rx="3" fill="#777777"/>
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.88312 4.68555C5.88312 4.13326 6.33083 3.68555 6.88312 3.68555H13.5059C14.0582 3.68555 14.5059 4.13326 14.5059 4.68555V10.3887H5.88312V4.68555Z" stroke="#6B6B6B"/>
|
||||
<rect x="3.8725" y="10.3887" width="12.7037" height="7.55371" rx="1.2" stroke="#6B6B6B"/>
|
||||
<path d="M8.21991 5.65234C8.21991 5.3762 8.44377 5.15234 8.71991 5.15234H11.7288C12.005 5.15234 12.2288 5.3762 12.2288 5.65234V10.3887H8.21991V5.65234Z" stroke="#6B6B6B"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 540 B |
|
@ -1,8 +1,8 @@
|
|||
<svg width="45" height="25" viewBox="0 0 45 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.18359 5.87035C2.18359 3.0074 4.50447 0.686523 7.36742 0.686523H36.9998C39.8627 0.686523 42.1836 3.0074 42.1836 5.87035V12.6865H2.18359V5.87035Z" fill="#DEDEDE"/>
|
||||
<rect x="0.183594" y="12.6865" width="44" height="12" fill="#C1C1C1"/>
|
||||
<rect x="5.68359" y="5.94824" width="6" height="12" rx="3" fill="#777777"/>
|
||||
<rect x="14.6836" y="5.94824" width="6" height="12" rx="3" fill="#777777"/>
|
||||
<rect x="23.6836" y="5.94824" width="6" height="12" rx="3" fill="#777777"/>
|
||||
<rect x="32.6836" y="5.94824" width="6" height="12" rx="3" fill="#777777"/>
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.26813 4.73877C4.26813 4.18648 4.71584 3.73877 5.26813 3.73877H15.2681C15.8204 3.73877 16.2681 4.18648 16.2681 4.73877V10.4419H4.26813V4.73877Z" stroke="#6B6B6B"/>
|
||||
<rect x="2.00372" y="10.4419" width="16.5289" height="7.55371" rx="1.2" stroke="#6B6B6B"/>
|
||||
<path d="M5.95978 6.13135C5.95978 5.85521 6.18364 5.63135 6.45978 5.63135H13.9891C14.2652 5.63135 14.4891 5.85521 14.4891 6.13135V10.4413H5.95978V6.13135Z" stroke="#6B6B6B"/>
|
||||
<line x1="8.26813" y1="9.96484" x2="8.26813" y2="6.10772" stroke="#6B6B6B"/>
|
||||
<line x1="10.3477" y1="9.96484" x2="10.3477" y2="6.10772" stroke="#6B6B6B"/>
|
||||
<line x1="12.4274" y1="9.96484" x2="12.4274" y2="6.10772" stroke="#6B6B6B"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 775 B |
|
@ -782,22 +782,30 @@ public:
|
|||
AMSCountPopupWindow(ExtruderGroup *extruder, int index)
|
||||
: PopupWindow(extruder, wxBORDER_NONE | wxPU_CONTAINS_CONTROLS)
|
||||
{
|
||||
auto msg = new wxStaticText(this, wxID_ANY, _L("Please set the number of ams installed on the this extrusion head."));
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
auto msg = new wxStaticText(this, wxID_ANY, _L("Set the number of AMS installed on the nozzle."));
|
||||
msg->SetFont(Label::Body_14);
|
||||
msg->SetForegroundColour(0x6B6B6B);
|
||||
msg->Wrap(FromDIP(240));
|
||||
auto img4 = new ScalableButton(this, wxID_ANY, "ams_4_tray", {}, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, false, 44);
|
||||
auto img1 = new ScalableButton(this, wxID_ANY, "ams_1_tray", {}, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, false, 44);
|
||||
auto txt4 = new wxStaticText(this, wxID_ANY, _L("AMS(4 colors)"));
|
||||
msg->SetForegroundColour("#262E30");
|
||||
msg->Wrap(FromDIP(280));
|
||||
auto box = new StaticBox(this, wxID_ANY);
|
||||
box->SetBackgroundColor(0xF8F8F8);
|
||||
box->SetBorderWidth(0);
|
||||
auto img4 = new ScalableButton(box, wxID_ANY, "ams_4_tray", {}, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, false, 44);
|
||||
//img4->SetBackgroundColour(*wxWHITE);
|
||||
auto img1 = new ScalableButton(box, wxID_ANY, "ams_1_tray", {}, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, false, 44);
|
||||
//img1->SetBackgroundColour(*wxWHITE);
|
||||
auto txt4 = new wxStaticText(box, wxID_ANY, _L("AMS(4 slots)"));
|
||||
txt4->SetFont(Label::Body_14);
|
||||
txt4->SetForegroundColour(0x6B6B6B);
|
||||
auto txt1 = new wxStaticText(this, wxID_ANY, _L("AMS(single color)"));
|
||||
txt4->SetBackgroundColour(0xF8F8F8);
|
||||
txt4->SetForegroundColour("#262E30");
|
||||
auto txt1 = new wxStaticText(box, wxID_ANY, _L("AMS(1 slot)"));
|
||||
txt1->SetFont(Label::Body_14);
|
||||
txt1->SetForegroundColour(0x6B6B6B);
|
||||
txt1->SetBackgroundColour(0xF8F8F8);
|
||||
txt1->SetForegroundColour("#262E30");
|
||||
int ams4 = 0, ams1 = 0;
|
||||
GetAMSCount(index, ams4, ams1);
|
||||
auto val4 = new SpinInput(this, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 4, ams4);
|
||||
auto val1 = new SpinInput(this, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 8, ams1);
|
||||
auto val4 = new SpinInput(box, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 4, ams4);
|
||||
auto val1 = new SpinInput(box, {}, {}, wxDefaultPosition, {FromDIP(60), -1}, 0, 0, 8, ams1);
|
||||
auto event_handler = [index, val4, val1, extruder](auto &evt) {
|
||||
SetAMSCount(index, val4->GetValue(), val1->GetValue());
|
||||
UpdateAMSCount(index, extruder);
|
||||
|
@ -807,18 +815,20 @@ public:
|
|||
|
||||
wxSizer * sizer = new wxBoxSizer(wxVERTICAL);
|
||||
sizer->Add(msg, 0, wxTOP | wxLEFT | wxRIGHT, FromDIP(10));
|
||||
wxSizer * sizer2 = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxSizer *sizer21 = new wxBoxSizer(wxVERTICAL);
|
||||
wxSizer *sizer2 = new wxBoxSizer(wxVERTICAL);
|
||||
wxSizer *sizer21 = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer21->Add(img4, 0, wxALIGN_CENTRE);
|
||||
sizer21->Add(txt4, 0, wxTOP | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer21->Add(val4, 0, wxTOP | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer2->Add(sizer21, 1);
|
||||
wxSizer *sizer22 = new wxBoxSizer(wxVERTICAL);
|
||||
sizer21->Add(txt4, 2, wxLEFT | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer21->Add(val4, 1, wxLEFT | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer2->Add(sizer21, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, FromDIP(14));
|
||||
sizer2->AddSpacer(FromDIP(6));
|
||||
wxSizer *sizer22 = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer22->Add(img1, 0, wxALIGN_CENTRE);
|
||||
sizer22->Add(txt1, 0, wxTOP | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer22->Add(val1, 0, wxTOP | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer2->Add(sizer22, 1);
|
||||
sizer->Add(sizer2, 0, wxTOP | wxBOTTOM | wxLEFT | wxRIGHT | wxEXPAND, FromDIP(10));
|
||||
sizer22->Add(txt1, 2, wxLEFT | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer22->Add(val1, 1, wxLEFT | wxALIGN_CENTRE, FromDIP(10));
|
||||
sizer2->Add(sizer22, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, FromDIP(14));
|
||||
box->SetSizer(sizer2);
|
||||
sizer->Add(box, 0, wxTOP | wxBOTTOM | wxLEFT | wxRIGHT | wxEXPAND, FromDIP(14));
|
||||
SetSizer(sizer);
|
||||
|
||||
Layout();
|
||||
|
@ -16446,7 +16456,7 @@ void Plater::set_need_update(bool need_update)
|
|||
bool Plater::PopupObjectTable(int object_id, int volume_id, const wxPoint& position)
|
||||
{
|
||||
if (dynamic_cast<TabPrinter *>(wxGetApp().get_tab(Preset::TYPE_PRINTER))->m_extruders_count > 1) {
|
||||
MessageDialog dlg(this, _L("Currently, the object configuration form cannot be used with multiple extruders."), _L("Not available"), wxOK | wxICON_WARNING);
|
||||
MessageDialog dlg(this, _L("Currently, the object configuration form cannot be used with a multiple-extruder printer."), _L("Not available"), wxOK | wxICON_WARNING);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue