mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -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
4
resources/images/link_wiki_img.svg
Normal file
4
resources/images/link_wiki_img.svg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M5.0166 4.74366C5.22248 4.14249 5.57248 3.67719 6.0666 3.34778C6.56895 3.01013 7.14543 2.84131 7.79601 2.84131C8.2819 2.84131 8.71013 2.93601 9.08072 3.12543C9.45131 3.3066 9.73954 3.5619 9.94543 3.89131C10.1513 4.21248 10.2542 4.57484 10.2542 4.97837C10.2542 5.39013 10.1554 5.73601 9.95778 6.01602C9.76837 6.28778 9.48013 6.59249 9.09307 6.93013C8.82131 7.18543 8.60307 7.40366 8.43837 7.58484C8.27366 7.76602 8.13366 7.98425 8.01837 8.23954C7.91131 8.4866 7.85778 8.77484 7.85778 9.10425C7.85778 9.33484 7.8866 9.56954 7.94425 9.80837H7.0919C6.98484 9.43778 6.93131 9.09602 6.93131 8.78307C6.93131 8.44543 6.98484 8.14896 7.0919 7.89366C7.20719 7.63013 7.34307 7.4119 7.49954 7.23896C7.65601 7.05778 7.86601 6.84366 8.12954 6.5966C8.45072 6.30837 8.68954 6.05719 8.84601 5.84307C9.00248 5.62072 9.08072 5.36131 9.08072 5.06484C9.08072 4.69425 8.95307 4.39778 8.69778 4.17543C8.44248 3.95307 8.10895 3.8419 7.69719 3.8419C6.85719 3.8419 6.24778 4.30719 5.86895 5.23778L5.0166 4.74366ZM7.62307 12.489C7.43366 12.489 7.26895 12.419 7.12895 12.279C6.99719 12.139 6.93131 11.9742 6.93131 11.7848C6.93131 11.5872 6.99719 11.4184 7.12895 11.2784C7.26895 11.1384 7.43366 11.0684 7.62307 11.0684C7.82072 11.0684 7.98543 11.1384 8.11719 11.2784C8.25719 11.4184 8.32719 11.5872 8.32719 11.7848C8.32719 11.9742 8.25719 12.139 8.11719 12.279C7.98543 12.419 7.82072 12.489 7.62307 12.489Z" fill="#FF6F00"/>
|
||||||
|
<circle cx="7.5" cy="7.5" r="7" stroke="#FF6F00"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -177,16 +177,19 @@ MonitorPanel::~MonitorPanel()
|
||||||
m_connection_info->SetTextColor(*wxWHITE);
|
m_connection_info->SetTextColor(*wxWHITE);
|
||||||
m_connection_info->SetFont(::Label::Body_13);
|
m_connection_info->SetFont(::Label::Body_13);
|
||||||
m_connection_info->SetCornerRadius(0);
|
m_connection_info->SetCornerRadius(0);
|
||||||
m_connection_info->SetSize(wxSize(FromDIP(220), FromDIP(25)));
|
m_connection_info->SetSize(wxSize(FromDIP(-1), FromDIP(25)));
|
||||||
m_connection_info->SetMinSize(wxSize(FromDIP(220), FromDIP(25)));
|
m_connection_info->SetMinSize(wxSize(FromDIP(-1), FromDIP(25)));
|
||||||
m_connection_info->SetMaxSize(wxSize(FromDIP(220), 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();
|
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);
|
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) != 0) || ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)) {
|
||||||
if ((status & (int) MonitorStatus::MONITOR_DISCONNECTED_SERVER))
|
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
|
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->Show();
|
||||||
m_connection_info->SetBackgroundColor(wxColour(255, 111, 0));
|
m_connection_info->SetBackgroundColor(wxColour(255, 111, 0));
|
||||||
m_connection_info->SetBorderColor(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) {
|
} else if ((status & (int) MonitorStatus::MONITOR_NORMAL) != 0) {
|
||||||
m_connection_info->Hide();
|
m_connection_info->Hide();
|
||||||
} else if ((status & (int) MonitorStatus::MONITOR_CONNECTING) != 0) {
|
} else if ((status & (int) MonitorStatus::MONITOR_CONNECTING) != 0) {
|
||||||
|
m_hyperlink->Hide();
|
||||||
m_connection_info->SetLabel(_L("Connecting..."));
|
m_connection_info->SetLabel(_L("Connecting..."));
|
||||||
m_connection_info->SetBackgroundColor(wxColour(0, 174, 66));
|
m_connection_info->SetBackgroundColor(wxColour(0, 174, 66));
|
||||||
m_connection_info->SetBorderColor(wxColour(0, 174, 66));
|
m_connection_info->SetBorderColor(wxColour(0, 174, 66));
|
||||||
|
|
|
@ -84,6 +84,7 @@ private:
|
||||||
UpgradePanel* m_upgrade_panel;
|
UpgradePanel* m_upgrade_panel;
|
||||||
HMSPanel* m_hms_panel;
|
HMSPanel* m_hms_panel;
|
||||||
Button * m_connection_info{nullptr};
|
Button * m_connection_info{nullptr};
|
||||||
|
wxHyperlinkCtrl* m_hyperlink{nullptr};
|
||||||
|
|
||||||
/* side tools */
|
/* side tools */
|
||||||
SideTools* m_side_tools{nullptr};
|
SideTools* m_side_tools{nullptr};
|
||||||
|
|
|
@ -637,7 +637,17 @@ void SelectMachinePopup::update_other_devices()
|
||||||
m_placeholder_panel = nullptr;
|
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_placeholder_panel->SetBackgroundColour(*wxWHITE);
|
||||||
m_sizer_other_devices->Add(m_placeholder_panel, 0, wxEXPAND, 0);
|
m_sizer_other_devices->Add(m_placeholder_panel, 0, wxEXPAND, 0);
|
||||||
|
|
||||||
|
@ -1033,11 +1043,23 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||||
// perpare mode
|
// perpare mode
|
||||||
m_panel_prepare = new wxPanel(m_simplebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
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(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_prepare = new wxBoxSizer(wxVERTICAL);
|
||||||
wxBoxSizer *m_sizer_pcont = new wxBoxSizer(wxHORIZONTAL);
|
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_sizer_pcont->Add(0, 0, 1, wxEXPAND, 0);
|
||||||
m_button_ensure = new Button(m_panel_prepare, _L("Print"));
|
m_button_ensure = new Button(m_panel_prepare, _L("Print"));
|
||||||
m_button_ensure->SetBackgroundColor(btn_bg_enable);
|
m_button_ensure->SetBackgroundColor(btn_bg_enable);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue