Show whether Edge backend is used in the webview sample
Allow to see at a glance whether Edge is being used or not.
This commit is contained in:
parent
0b2dd516c1
commit
5d9e1ceb80
@ -366,11 +366,21 @@ WebFrame::WebFrame(const wxString& url) :
|
|||||||
m_info = new wxInfoBar(this);
|
m_info = new wxInfoBar(this);
|
||||||
topsizer->Add(m_info, wxSizerFlags().Expand());
|
topsizer->Add(m_info, wxSizerFlags().Expand());
|
||||||
|
|
||||||
|
// Create a log window
|
||||||
|
new wxLogWindow(this, _("Logging"), true, false);
|
||||||
|
|
||||||
// Create the webview
|
// Create the webview
|
||||||
wxString backend = wxWebViewBackendDefault;
|
wxString backend = wxWebViewBackendDefault;
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
if (wxWebView::IsBackendAvailable(wxWebViewBackendEdge))
|
if (wxWebView::IsBackendAvailable(wxWebViewBackendEdge))
|
||||||
|
{
|
||||||
|
wxLogMessage("Using Edge backend");
|
||||||
backend = wxWebViewBackendEdge;
|
backend = wxWebViewBackendEdge;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxLogMessage("Edge backend not available");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxDefaultSize, backend);
|
m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxDefaultSize, backend);
|
||||||
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
||||||
@ -385,9 +395,6 @@ WebFrame::WebFrame(const wxString& url) :
|
|||||||
//Set a more sensible size for web browsing
|
//Set a more sensible size for web browsing
|
||||||
SetSize(wxSize(800, 600));
|
SetSize(wxSize(800, 600));
|
||||||
|
|
||||||
// Create a log window
|
|
||||||
new wxLogWindow(this, _("Logging"), true, false);
|
|
||||||
|
|
||||||
// Create the Tools menu
|
// Create the Tools menu
|
||||||
m_tools_menu = new wxMenu();
|
m_tools_menu = new wxMenu();
|
||||||
wxMenuItem* print = m_tools_menu->Append(wxID_ANY , _("Print"));
|
wxMenuItem* print = m_tools_menu->Append(wxID_ANY , _("Print"));
|
||||||
|
Loading…
Reference in New Issue
Block a user