mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
ENH: update hms panel and upgrade panel when disconnected
Change-Id: I75d724c99ec2029190641cd2cfa22b6337d0060d Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
42633fda28
commit
e344f8b8b9
5 changed files with 46 additions and 5 deletions
|
@ -149,7 +149,7 @@ MachineInfoPanel::MachineInfoPanel(wxWindow* parent, wxWindowID id, const wxPoin
|
|||
StateColor btn_text(std::pair<wxColour, int>(wxColour(144, 144, 144), StateColor::Disabled), std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Enabled));
|
||||
m_button_upgrade_firmware->SetBackgroundColor(btn_bg);
|
||||
m_button_upgrade_firmware->SetBorderColor(btn_bd);
|
||||
m_button_upgrade_firmware->SetTextColor(wxColour("#FFFFFE"));
|
||||
m_button_upgrade_firmware->SetTextColor(btn_text);
|
||||
m_button_upgrade_firmware->SetFont(Label::Body_10);
|
||||
m_button_upgrade_firmware->SetMinSize(wxSize(FromDIP(-1), FromDIP(24)));
|
||||
m_button_upgrade_firmware->SetCornerRadius(FromDIP(12));
|
||||
|
@ -856,6 +856,23 @@ void UpgradePanel::update(MachineObject *obj)
|
|||
m_obj = obj;
|
||||
}
|
||||
|
||||
void UpgradePanel::show_status(int status)
|
||||
{
|
||||
if (last_status == status) return;
|
||||
last_status = status;
|
||||
|
||||
if (((status & (int)MonitorStatus::MONITOR_DISCONNECTED) != 0)
|
||||
|| ((status & (int)MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)
|
||||
|| ((status & (int)MonitorStatus::MONITOR_CONNECTING) != 0)
|
||||
|| ((status & (int)MonitorStatus::MONITOR_NO_PRINTER) != 0)
|
||||
) {
|
||||
;
|
||||
}
|
||||
else if ((status & (int)MonitorStatus::MONITOR_NORMAL) != 0) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
bool UpgradePanel::Show(bool show)
|
||||
{
|
||||
if (show) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue