mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 05:24:01 -06:00
NEW:add printer tips can link to wiki
Change-Id: Id6fc6afbcdfcab9ac0747d9f7228f94aba6c871e
This commit is contained in:
parent
ee62ffcc7d
commit
2ed702766b
4 changed files with 50 additions and 14 deletions
|
@ -177,16 +177,19 @@ MonitorPanel::~MonitorPanel()
|
|||
m_connection_info->SetTextColor(*wxWHITE);
|
||||
m_connection_info->SetFont(::Label::Body_13);
|
||||
m_connection_info->SetCornerRadius(0);
|
||||
m_connection_info->SetSize(wxSize(FromDIP(220), FromDIP(25)));
|
||||
m_connection_info->SetMinSize(wxSize(FromDIP(220), FromDIP(25)));
|
||||
m_connection_info->SetMaxSize(wxSize(FromDIP(220), FromDIP(25)));
|
||||
m_connection_info->SetSize(wxSize(FromDIP(-1), FromDIP(25)));
|
||||
m_connection_info->SetMinSize(wxSize(FromDIP(-1), FromDIP(25)));
|
||||
m_connection_info->SetMaxSize(wxSize(FromDIP(-1), FromDIP(25)));
|
||||
|
||||
wxBoxSizer* connection_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_hyperlink = new wxHyperlinkCtrl(m_connection_info, wxID_ANY, _L("Failed to connect to the server"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
connection_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
m_hyperlink->SetBackgroundColour(wxColour(255, 111, 0));
|
||||
m_connection_info->SetSizer(connection_sizer);
|
||||
m_connection_info->Layout();
|
||||
connection_sizer->Fit(m_connection_info);
|
||||
|
||||
m_connection_info->Hide();
|
||||
/*sizer_boxv->Add(m_connection_info, 0, wxALIGN_CENTER, 0);
|
||||
sizer_boxh->Add(sizer_boxv, 1, wxALIGN_CENTER, 0);
|
||||
warning_panel->SetSizer(sizer_boxh);
|
||||
warning_panel->Layout();*/
|
||||
|
||||
|
||||
|
||||
|
||||
sizer_side_tools->Add(m_connection_info, 0, wxEXPAND, 0);
|
||||
|
@ -507,9 +510,14 @@ void MonitorPanel::show_status(int status)
|
|||
|
||||
if (((status & (int) MonitorStatus::MONITOR_DISCONNECTED) != 0) || ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)) {
|
||||
if ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER))
|
||||
m_connection_info->SetLabel(_L("Failed to connect to the server"));
|
||||
m_hyperlink->SetLabel(_L("Failed to connect to the server"));
|
||||
//m_connection_info->SetLabel(_L("Failed to connect to the server"));
|
||||
else
|
||||
m_connection_info->SetLabel(_L("Failed to connect to the printer"));
|
||||
m_hyperlink->SetLabel(_L("Failed to connect to the printer"));
|
||||
//m_connection_info->SetLabel(_L("Failed to connect to the printer"));
|
||||
|
||||
m_hyperlink->Show();
|
||||
m_connection_info->SetLabel(wxEmptyString);
|
||||
m_connection_info->Show();
|
||||
m_connection_info->SetBackgroundColor(wxColour(255, 111, 0));
|
||||
m_connection_info->SetBorderColor(wxColour(255, 111, 0));
|
||||
|
@ -519,6 +527,7 @@ void MonitorPanel::show_status(int status)
|
|||
} else if ((status & (int) MonitorStatus::MONITOR_NORMAL) != 0) {
|
||||
m_connection_info->Hide();
|
||||
} else if ((status & (int) MonitorStatus::MONITOR_CONNECTING) != 0) {
|
||||
m_hyperlink->Hide();
|
||||
m_connection_info->SetLabel(_L("Connecting..."));
|
||||
m_connection_info->SetBackgroundColor(wxColour(0, 174, 66));
|
||||
m_connection_info->SetBorderColor(wxColour(0, 174, 66));
|
||||
|
|
|
@ -84,6 +84,7 @@ private:
|
|||
UpgradePanel* m_upgrade_panel;
|
||||
HMSPanel* m_hms_panel;
|
||||
Button * m_connection_info{nullptr};
|
||||
wxHyperlinkCtrl* m_hyperlink{nullptr};
|
||||
|
||||
/* side tools */
|
||||
SideTools* m_side_tools{nullptr};
|
||||
|
|
|
@ -637,7 +637,17 @@ void SelectMachinePopup::update_other_devices()
|
|||
m_placeholder_panel = nullptr;
|
||||
}
|
||||
|
||||
m_placeholder_panel = new wxWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxSize(-1,FromDIP(10)));
|
||||
m_placeholder_panel = new wxWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxSize(-1,FromDIP(26)));
|
||||
wxBoxSizer* placeholder_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
auto m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
placeholder_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
|
||||
|
||||
m_placeholder_panel->SetSizer(placeholder_sizer);
|
||||
m_placeholder_panel->Layout();
|
||||
placeholder_sizer->Fit(m_placeholder_panel);
|
||||
|
||||
m_placeholder_panel->SetBackgroundColour(*wxWHITE);
|
||||
m_sizer_other_devices->Add(m_placeholder_panel, 0, wxEXPAND, 0);
|
||||
|
||||
|
@ -1033,11 +1043,23 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
|||
// perpare mode
|
||||
m_panel_prepare = new wxPanel(m_simplebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
||||
m_panel_prepare->SetBackgroundColour(m_colour_def_color);
|
||||
// m_panel_prepare->SetBackgroundColour(wxColour(135,206,250));
|
||||
//m_panel_prepare->SetBackgroundColour(wxColour(135,206,250));
|
||||
wxBoxSizer *m_sizer_prepare = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer *m_sizer_pcont = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
m_sizer_prepare->Add(0, 0, 1, wxTOP, FromDIP(22));
|
||||
m_sizer_prepare->Add(0, 0, 1, wxTOP, FromDIP(12));
|
||||
|
||||
auto hyperlink_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
auto m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Can't connect to the printer"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
|
||||
auto linkimg = new wxStaticBitmap(m_panel_prepare, wxID_ANY, create_scaled_bitmap("link_wiki_img", this, 18), wxDefaultPosition, wxSize(FromDIP(18), FromDIP(18)), 0);
|
||||
|
||||
hyperlink_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
hyperlink_sizer->Add(linkimg, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
|
||||
|
||||
m_sizer_prepare->Add(hyperlink_sizer, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
|
||||
|
||||
m_sizer_pcont->Add(0, 0, 1, wxEXPAND, 0);
|
||||
m_button_ensure = new Button(m_panel_prepare, _L("Print"));
|
||||
m_button_ensure->SetBackgroundColor(btn_bg_enable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue