mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-10 21:37:06 -06:00
ENH:update options ui when printer does not match
jira:[STUDIO-9973] Change-Id: Icca959d732f98e34b0a83fc2971c70b64d393d75 (cherry picked from commit e7454fa47d09c529db3262faf19e2e2f22bdb5d7)
This commit is contained in:
parent
01c2a31ac9
commit
074a9c1bba
3 changed files with 27 additions and 10 deletions
3
resources/images/advanced_option1_disable.svg
Normal file
3
resources/images/advanced_option1_disable.svg
Normal file
|
|
@ -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 |
|
|
@ -579,21 +579,18 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
|||
|
||||
|
||||
|
||||
auto advanced_options_title = new Label(scroll_area, _L("Advanced Options"));
|
||||
advanced_options_title->SetFont(::Label::Body_13);
|
||||
advanced_options_title->SetForegroundColour(wxColour(38, 46, 48));
|
||||
|
||||
m_advanced_options_title = new Label(scroll_area, _L("Advanced Options"));
|
||||
m_advanced_options_title->SetFont(::Label::Body_13);
|
||||
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(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);
|
||||
|
||||
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);});
|
||||
advanced_options_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
|
||||
m_advanced_options_title->Bind(wxEVT_ENTER_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_HAND);});
|
||||
m_advanced_options_title->Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) {SetCursor(wxCURSOR_ARROW);});
|
||||
m_advanced_options_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
|
||||
if (m_print_status == PrintStatusUnsupportedPrinter) {
|
||||
m_options_other->Hide();
|
||||
} else {
|
||||
|
|
@ -1841,6 +1838,8 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||
wxString msg_text = _L("Storage needs to be inserted before printing.");
|
||||
update_print_status_msg(msg_text, true, false, true);
|
||||
}else if (status == PrintDialogStatus::PrintStatusUnsupportedPrinter) {
|
||||
enable_advanced_option(false);
|
||||
|
||||
wxString msg_text;
|
||||
try
|
||||
{
|
||||
|
|
@ -2949,6 +2948,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)
|
||||
{
|
||||
/* reset timeout and reading printer info */
|
||||
|
|
@ -2963,6 +2973,8 @@ void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
|
|||
m_change_filament_times_sizer->Show(false);
|
||||
m_txt_change_filament_times->Show(false);
|
||||
|
||||
enable_advanced_option(true);
|
||||
|
||||
auto selection = m_comboBox_printer->GetSelection();
|
||||
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
if (!dev) return;
|
||||
|
|
|
|||
|
|
@ -374,6 +374,7 @@ protected:
|
|||
Label* m_txt_change_filament_times{ nullptr };
|
||||
Label* m_text_printer_msg{ nullptr };
|
||||
Label* m_text_printer_msg_tips{ nullptr };
|
||||
Label* m_advanced_options_title{ nullptr };
|
||||
wxStaticText* m_staticText_bed_title{ nullptr };
|
||||
wxStaticText* m_stext_sending{ nullptr };
|
||||
wxStaticText* m_statictext_finish{nullptr};
|
||||
|
|
@ -466,7 +467,8 @@ public:
|
|||
void set_default_from_sdcard();
|
||||
void update_page_turn_state(bool show);
|
||||
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 Enable_Refresh_Button(bool en);
|
||||
void Enable_Send_Button(bool en);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue