mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX: [STUDIO-1770] webview white background
Change-Id: Ie828f53139978b0f7745355e7c65c7f6067dd4d3
This commit is contained in:
parent
3190283929
commit
301d06dab4
2 changed files with 12 additions and 5 deletions
|
@ -38,6 +38,7 @@ GuideFrame::GuideFrame(GUI_App *pGUI, long style)
|
||||||
: DPIDialog((wxWindow *) (pGUI->mainframe), wxID_ANY, "BambuStudio", wxDefaultPosition, wxDefaultSize, style),
|
: DPIDialog((wxWindow *) (pGUI->mainframe), wxID_ANY, "BambuStudio", wxDefaultPosition, wxDefaultSize, style),
|
||||||
m_appconfig_new()
|
m_appconfig_new()
|
||||||
{
|
{
|
||||||
|
SetBackgroundColour(*wxWHITE);
|
||||||
// INI
|
// INI
|
||||||
m_SectionName = "firstguide";
|
m_SectionName = "firstguide";
|
||||||
PrivacyUse = true;
|
PrivacyUse = true;
|
||||||
|
@ -57,7 +58,9 @@ GuideFrame::GuideFrame(GUI_App *pGUI, long style)
|
||||||
wxLogError("Could not init m_browser");
|
wxLogError("Could not init m_browser");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_browser->Hide();
|
||||||
|
m_browser->SetSize(0, 0);
|
||||||
|
|
||||||
SetSizer(topsizer);
|
SetSizer(topsizer);
|
||||||
|
|
||||||
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
||||||
|
@ -123,7 +126,6 @@ GuideFrame::~GuideFrame()
|
||||||
void GuideFrame::load_url(wxString &url)
|
void GuideFrame::load_url(wxString &url)
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< " enter, url=" << url.ToStdString();
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< " enter, url=" << url.ToStdString();
|
||||||
this->Show();
|
|
||||||
WebView::LoadUrl(m_browser, url);
|
WebView::LoadUrl(m_browser, url);
|
||||||
m_browser->SetFocus();
|
m_browser->SetFocus();
|
||||||
UpdateState();
|
UpdateState();
|
||||||
|
@ -223,7 +225,9 @@ void GuideFrame::OnNavigationRequest(wxWebViewEvent &evt)
|
||||||
void GuideFrame::OnNavigationComplete(wxWebViewEvent &evt)
|
void GuideFrame::OnNavigationComplete(wxWebViewEvent &evt)
|
||||||
{
|
{
|
||||||
//wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
|
//wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
|
||||||
|
m_browser->Show();
|
||||||
|
Layout();
|
||||||
|
|
||||||
wxString NewUrl = evt.GetURL();
|
wxString NewUrl = evt.GetURL();
|
||||||
|
|
||||||
UpdateState();
|
UpdateState();
|
||||||
|
|
|
@ -51,6 +51,7 @@ string &replace_str(string &str, const string &to_replaced, const string &newcha
|
||||||
|
|
||||||
ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_ANY, "BambuStudio")
|
ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_ANY, "BambuStudio")
|
||||||
{
|
{
|
||||||
|
SetBackgroundColour(*wxWHITE);
|
||||||
// Url
|
// Url
|
||||||
AppConfig * config = wxGetApp().app_config;
|
AppConfig * config = wxGetApp().app_config;
|
||||||
NetworkAgent* agent = wxGetApp().getAgent();
|
NetworkAgent* agent = wxGetApp().getAgent();
|
||||||
|
@ -77,6 +78,8 @@ ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_AN
|
||||||
wxLogError("Could not init m_browser");
|
wxLogError("Could not init m_browser");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_browser->Hide();
|
||||||
|
m_browser->SetSize(0, 0);
|
||||||
|
|
||||||
// Log backend information
|
// Log backend information
|
||||||
// wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());
|
// wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());
|
||||||
|
@ -143,7 +146,6 @@ bool ZUserLogin::run() {
|
||||||
|
|
||||||
void ZUserLogin::load_url(wxString &url)
|
void ZUserLogin::load_url(wxString &url)
|
||||||
{
|
{
|
||||||
this->Show();
|
|
||||||
m_browser->LoadURL(url);
|
m_browser->LoadURL(url);
|
||||||
m_browser->SetFocus();
|
m_browser->SetFocus();
|
||||||
UpdateState();
|
UpdateState();
|
||||||
|
@ -190,7 +192,8 @@ void ZUserLogin::OnNavigationRequest(wxWebViewEvent &evt)
|
||||||
void ZUserLogin::OnNavigationComplete(wxWebViewEvent &evt)
|
void ZUserLogin::OnNavigationComplete(wxWebViewEvent &evt)
|
||||||
{
|
{
|
||||||
// wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
|
// wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
|
||||||
|
m_browser->Show();
|
||||||
|
Layout();
|
||||||
UpdateState();
|
UpdateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue