mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
ENH:display error msg when connecting to the printer fails
Change-Id: I483d6c00bdd623e34bce5b087bfbcb9a5e876fa3
This commit is contained in:
parent
4fd8a2b957
commit
6f2839b641
25 changed files with 378 additions and 127 deletions
|
@ -36,14 +36,26 @@ BBLStatusBarSend::BBLStatusBarSend(wxWindow *parent, int id)
|
|||
m_prog->SetMinSize(wxSize(m_self->FromDIP(300),m_self->FromDIP(6)));
|
||||
m_prog->SetValue(0);
|
||||
|
||||
StateColor btn_bd_white(std::pair<wxColour, int>(*wxWHITE, StateColor::Disabled), std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Enabled));
|
||||
//StateColor btn_bd_white(std::pair<wxColour, int>(*wxWHITE, StateColor::Disabled), std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Enabled));
|
||||
|
||||
StateColor btn_bt_white(std::pair<wxColour, int>(wxColour(0x90, 0x90, 0x90), StateColor::Disabled),
|
||||
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));
|
||||
|
||||
StateColor btn_bd_white(std::pair<wxColour, int>(wxColour(255, 255, 254), StateColor::Disabled),
|
||||
std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Enabled));
|
||||
|
||||
|
||||
StateColor btn_txt_white(std::pair<wxColour, int>(wxColour("#FFFFFE"), StateColor::Disabled), std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Normal));
|
||||
|
||||
m_cancelbutton = new Button(m_self, _L("Cancel"));
|
||||
m_cancelbutton->SetSize(wxSize(m_self->FromDIP(58), m_self->FromDIP(22)));
|
||||
m_cancelbutton->SetMinSize(wxSize(m_self->FromDIP(58), m_self->FromDIP(22)));
|
||||
m_cancelbutton->SetMaxSize(wxSize(m_self->FromDIP(58), m_self->FromDIP(22)));
|
||||
m_cancelbutton->SetBackgroundColor(wxColour(255, 255, 255));
|
||||
m_cancelbutton->SetBackgroundColor(btn_bt_white);
|
||||
m_cancelbutton->SetBorderColor(btn_bd_white);
|
||||
m_cancelbutton->SetTextColor(btn_txt_white);
|
||||
m_cancelbutton->SetCornerRadius(m_self->FromDIP(12));
|
||||
m_cancelbutton->Bind(wxEVT_BUTTON,
|
||||
[this](wxCommandEvent &evt) {
|
||||
|
@ -332,6 +344,7 @@ void BBLStatusBarSend::reset()
|
|||
m_static_bitmap_show_error->Hide();
|
||||
m_prog->Show();
|
||||
m_stext_percent->Show();
|
||||
m_cancelbutton->Enable();
|
||||
m_cancelbutton->Show();
|
||||
m_was_cancelled = false;
|
||||
|
||||
|
@ -362,4 +375,14 @@ void BBLStatusBarSend::change_button_label(wxString name)
|
|||
m_cancelbutton->SetLabel(name);
|
||||
}
|
||||
|
||||
void BBLStatusBarSend::disable_cancel_button()
|
||||
{
|
||||
m_cancelbutton->Disable();
|
||||
}
|
||||
|
||||
void BBLStatusBarSend::enable_cancel_button()
|
||||
{
|
||||
m_cancelbutton->Enable();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue