FIX: [STUDIO-1614] hide home webview before loaded
Change-Id: I5182e3058575c3e542813b3c380fe6dcfd11c037 (cherry picked from commit e4684cf43ee0cd11beb2cc6dea35900218d0ca98)
This commit is contained in:
parent
4bab300e18
commit
90275620d6
2 changed files with 6 additions and 8 deletions
|
@ -65,8 +65,6 @@ MediaPlayCtrl::MediaPlayCtrl(wxWindow *parent, wxMediaCtrl2 *media_ctrl, const w
|
||||||
|
|
||||||
m_lan_user = "bblp";
|
m_lan_user = "bblp";
|
||||||
m_lan_passwd = "bblp";
|
m_lan_passwd = "bblp";
|
||||||
|
|
||||||
wxGetApp().UpdateDarkUIWin(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaPlayCtrl::~MediaPlayCtrl()
|
MediaPlayCtrl::~MediaPlayCtrl()
|
||||||
|
|
|
@ -38,7 +38,6 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||||
|
|
||||||
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
|
|
||||||
#if !BBL_RELEASE_TO_PUBLIC
|
#if !BBL_RELEASE_TO_PUBLIC
|
||||||
// Create the button
|
// Create the button
|
||||||
bSizer_toolbar = new wxBoxSizer(wxHORIZONTAL);
|
bSizer_toolbar = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
@ -64,12 +63,13 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||||
m_button_tools = new wxButton(this, wxID_ANY, wxT("Tools"), wxDefaultPosition, wxDefaultSize, 0);
|
m_button_tools = new wxButton(this, wxID_ANY, wxT("Tools"), wxDefaultPosition, wxDefaultSize, 0);
|
||||||
bSizer_toolbar->Add(m_button_tools, 0, wxALL, 5);
|
bSizer_toolbar->Add(m_button_tools, 0, wxALL, 5);
|
||||||
|
|
||||||
|
topsizer->Add(bSizer_toolbar, 0, wxEXPAND, 0);
|
||||||
|
bSizer_toolbar->Show(false);
|
||||||
|
|
||||||
// Create panel for find toolbar.
|
// Create panel for find toolbar.
|
||||||
wxPanel* panel = new wxPanel(this);
|
wxPanel* panel = new wxPanel(this);
|
||||||
topsizer->Add(bSizer_toolbar, 0, wxEXPAND, 0);
|
|
||||||
topsizer->Add(panel, wxSizerFlags().Expand());
|
topsizer->Add(panel, wxSizerFlags().Expand());
|
||||||
|
|
||||||
|
|
||||||
// Create sizer for panel.
|
// Create sizer for panel.
|
||||||
wxBoxSizer* panel_sizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* panel_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
panel->SetSizer(panel_sizer);
|
panel->SetSizer(panel_sizer);
|
||||||
|
@ -77,14 +77,13 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||||
// Create the info panel
|
// Create the info panel
|
||||||
m_info = new wxInfoBar(this);
|
m_info = new wxInfoBar(this);
|
||||||
topsizer->Add(m_info, wxSizerFlags().Expand());
|
topsizer->Add(m_info, wxSizerFlags().Expand());
|
||||||
|
|
||||||
// Create the webview
|
// Create the webview
|
||||||
m_browser = WebView::CreateWebView(this, url);
|
m_browser = WebView::CreateWebView(this, url);
|
||||||
if (m_browser == nullptr) {
|
if (m_browser == nullptr) {
|
||||||
wxLogError("Could not init m_browser");
|
wxLogError("Could not init m_browser");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_browser->Hide();
|
||||||
SetSizer(topsizer);
|
SetSizer(topsizer);
|
||||||
|
|
||||||
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
||||||
|
@ -305,7 +304,6 @@ void WebViewPanel::OnIdle(wxIdleEvent& WXUNUSED(evt))
|
||||||
m_button_stop->Enable(false);
|
m_button_stop->Enable(false);
|
||||||
}
|
}
|
||||||
#endif //BBL_RELEASE_TO_PUBLIC
|
#endif //BBL_RELEASE_TO_PUBLIC
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -522,6 +520,8 @@ void WebViewPanel::OnNavigationRequest(wxWebViewEvent& evt)
|
||||||
*/
|
*/
|
||||||
void WebViewPanel::OnNavigationComplete(wxWebViewEvent& evt)
|
void WebViewPanel::OnNavigationComplete(wxWebViewEvent& evt)
|
||||||
{
|
{
|
||||||
|
m_browser->Show();
|
||||||
|
Layout();
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||||
if (wxGetApp().get_mode() == comDevelop)
|
if (wxGetApp().get_mode() == comDevelop)
|
||||||
wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
|
wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
|
||||||
|
|
Loading…
Reference in a new issue