mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-21 20:25:20 +00:00
FIX:The blank page appeared when clicking to log in
Change-Id: I0f6904c85da5f72fa9d4c0be0e8174acdf44cc8c
This commit is contained in:
@@ -57,7 +57,37 @@ ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_AN
|
||||
// Url
|
||||
AppConfig * config = wxGetApp().app_config;
|
||||
NetworkAgent* agent = wxGetApp().getAgent();
|
||||
if (!agent) return;
|
||||
if (!agent) {
|
||||
std::string icon_path = (boost::format("%1%/images/BambuStudioTitle.ico") % resources_dir()).str();
|
||||
SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
|
||||
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
|
||||
wxBoxSizer* m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
||||
auto m_line_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 1));
|
||||
m_line_top->SetBackgroundColour(wxColour(166, 169, 170));
|
||||
m_sizer_main->Add(m_line_top, 0, wxEXPAND, 0);
|
||||
|
||||
auto* m_message = new wxStaticText(this, wxID_ANY, _L("Bambu Network plug-in not detected."), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_message->SetForegroundColour(*wxBLACK);
|
||||
m_message->Wrap(FromDIP(360));
|
||||
|
||||
auto m_download_hyperlink = new wxHyperlinkCtrl(this, wxID_ANY, _L("Click here to download it."), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
m_download_hyperlink->Bind(wxEVT_HYPERLINK, [this](wxCommandEvent& event) {
|
||||
this->Close();
|
||||
wxGetApp().ShowDownNetPluginDlg();
|
||||
});
|
||||
m_sizer_main->Add(m_message, 0, wxALIGN_CENTER | wxALL, FromDIP(15));
|
||||
m_sizer_main->Add(m_download_hyperlink, 0, wxALIGN_CENTER | wxALL, FromDIP(10));
|
||||
m_sizer_main->Add(0, 0, 1, wxBOTTOM, 10);
|
||||
|
||||
SetSizer(m_sizer_main);
|
||||
m_sizer_main->SetSizeHints(this);
|
||||
Layout();
|
||||
Fit();
|
||||
CentreOnParent();
|
||||
}
|
||||
else {
|
||||
std::string host_url = agent->get_bambulab_host();
|
||||
TargetUrl = host_url + "/sign-in";
|
||||
m_networkOk = false;
|
||||
@@ -114,10 +144,7 @@ ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_AN
|
||||
int MaxY = (screenheight - pSize.y) > 0 ? (screenheight - pSize.y) / 2 : 0;
|
||||
wxPoint tmpPT((screenwidth - pSize.x) / 2, MaxY);
|
||||
Move(tmpPT);
|
||||
|
||||
//Param
|
||||
m_AutotestToken = "";
|
||||
|
||||
}
|
||||
wxGetApp().UpdateDlgDarkUI(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user