ENH:update options ui when printer does not match
jira:[STUDIO-9973] Change-Id: Icca959d732f98e34b0a83fc2971c70b64d393d75
This commit is contained in:
parent
b9a835efd7
commit
e7454fa47d
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12.4742 9.15669C12.7353 9.41782 12.7353 9.84008 12.4742 10.0984L7.14038 15.435C6.87924 15.6961 6.45698 15.6961 6.19863 15.435C5.94027 15.1739 5.93749 14.7516 6.19863 14.4933L11.0602 9.63173L6.19585 4.76742C5.93472 4.50628 5.93472 4.08403 6.19585 3.82567C6.45698 3.56731 6.87924 3.56454 7.1376 3.82567L12.4742 9.15669Z" fill="#CECECE"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 449 B |
|
@ -581,21 +581,18 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto advanced_options_title = new Label(scroll_area, _L("Advanced Options"));
|
m_advanced_options_title = new Label(scroll_area, _L("Advanced Options"));
|
||||||
advanced_options_title->SetFont(::Label::Body_13);
|
m_advanced_options_title->SetFont(::Label::Body_13);
|
||||||
advanced_options_title->SetForegroundColour(wxColour(38, 46, 48));
|
|
||||||
|
|
||||||
m_advanced_options_icon = new wxStaticBitmap(scroll_area, wxID_ANY, create_scaled_bitmap("advanced_option1", scroll_area, 18), wxDefaultPosition, wxSize(FromDIP(18), FromDIP(18)));
|
m_advanced_options_icon = new wxStaticBitmap(scroll_area, wxID_ANY, create_scaled_bitmap("advanced_option1", scroll_area, 18), wxDefaultPosition, wxSize(FromDIP(18), FromDIP(18)));
|
||||||
|
|
||||||
|
|
||||||
sizer_advanced_options_title->Add(m_hyperlink, 0, wxALIGN_CENTER, 0);
|
sizer_advanced_options_title->Add(m_hyperlink, 0, wxALIGN_CENTER, 0);
|
||||||
sizer_advanced_options_title->Add(0, 0, 1, wxEXPAND, 0);
|
sizer_advanced_options_title->Add(0, 0, 1, wxEXPAND, 0);
|
||||||
sizer_advanced_options_title->Add(advanced_options_title, 0, wxALIGN_CENTER, 0);
|
sizer_advanced_options_title->Add(m_advanced_options_title, 0, wxALIGN_CENTER, 0);
|
||||||
sizer_advanced_options_title->Add(m_advanced_options_icon, 0, wxALIGN_CENTER, 0);
|
sizer_advanced_options_title->Add(m_advanced_options_icon, 0, wxALIGN_CENTER, 0);
|
||||||
|
|
||||||
advanced_options_title->Bind(wxEVT_ENTER_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_HAND);});
|
m_advanced_options_title->Bind(wxEVT_ENTER_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_HAND);});
|
||||||
advanced_options_title->Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_ARROW);});
|
m_advanced_options_title->Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_ARROW);});
|
||||||
advanced_options_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
|
m_advanced_options_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
|
||||||
if (m_print_status == PrintStatusUnsupportedPrinter) {
|
if (m_print_status == PrintStatusUnsupportedPrinter) {
|
||||||
m_options_other->Hide();
|
m_options_other->Hide();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1843,6 +1840,8 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
||||||
wxString msg_text = _L("Storage needs to be inserted before printing.");
|
wxString msg_text = _L("Storage needs to be inserted before printing.");
|
||||||
update_print_status_msg(msg_text, true, false, true);
|
update_print_status_msg(msg_text, true, false, true);
|
||||||
}else if (status == PrintDialogStatus::PrintStatusUnsupportedPrinter) {
|
}else if (status == PrintDialogStatus::PrintStatusUnsupportedPrinter) {
|
||||||
|
enable_advanced_option(false);
|
||||||
|
|
||||||
wxString msg_text;
|
wxString msg_text;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2959,6 +2958,17 @@ void SelectMachineDialog::on_timer(wxTimerEvent &event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SelectMachineDialog::enable_advanced_option(bool en)
|
||||||
|
{
|
||||||
|
if (en) {
|
||||||
|
m_advanced_options_title->SetForegroundColour(wxColour(38, 46, 48));
|
||||||
|
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option1", this, 18));
|
||||||
|
} else {
|
||||||
|
m_advanced_options_title->SetForegroundColour(0xCECECE);
|
||||||
|
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option1_disable", this, 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
|
void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
|
||||||
{
|
{
|
||||||
/* reset timeout and reading printer info */
|
/* reset timeout and reading printer info */
|
||||||
|
@ -2973,6 +2983,8 @@ void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
|
||||||
m_change_filament_times_sizer->Show(false);
|
m_change_filament_times_sizer->Show(false);
|
||||||
m_txt_change_filament_times->Show(false);
|
m_txt_change_filament_times->Show(false);
|
||||||
|
|
||||||
|
enable_advanced_option(true);
|
||||||
|
|
||||||
auto selection = m_comboBox_printer->GetSelection();
|
auto selection = m_comboBox_printer->GetSelection();
|
||||||
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||||
if (!dev) return;
|
if (!dev) return;
|
||||||
|
|
|
@ -370,6 +370,7 @@ protected:
|
||||||
Label* m_txt_change_filament_times{ nullptr };
|
Label* m_txt_change_filament_times{ nullptr };
|
||||||
Label* m_text_printer_msg{ nullptr };
|
Label* m_text_printer_msg{ nullptr };
|
||||||
Label* m_text_printer_msg_tips{ nullptr };
|
Label* m_text_printer_msg_tips{ nullptr };
|
||||||
|
Label* m_advanced_options_title{ nullptr };
|
||||||
wxStaticText* m_staticText_bed_title{ nullptr };
|
wxStaticText* m_staticText_bed_title{ nullptr };
|
||||||
wxStaticText* m_stext_sending{ nullptr };
|
wxStaticText* m_stext_sending{ nullptr };
|
||||||
wxStaticText* m_statictext_finish{nullptr};
|
wxStaticText* m_statictext_finish{nullptr};
|
||||||
|
@ -463,7 +464,8 @@ public:
|
||||||
void set_default_from_sdcard();
|
void set_default_from_sdcard();
|
||||||
void update_page_turn_state(bool show);
|
void update_page_turn_state(bool show);
|
||||||
void on_timer(wxTimerEvent& event);
|
void on_timer(wxTimerEvent& event);
|
||||||
void on_selection_changed(wxCommandEvent& event);
|
void enable_advanced_option(bool en);
|
||||||
|
void on_selection_changed(wxCommandEvent &event);
|
||||||
void update_flow_cali_check(MachineObject* obj);
|
void update_flow_cali_check(MachineObject* obj);
|
||||||
void Enable_Refresh_Button(bool en);
|
void Enable_Refresh_Button(bool en);
|
||||||
void Enable_Send_Button(bool en);
|
void Enable_Send_Button(bool en);
|
||||||
|
|
Loading…
Reference in New Issue