History

Update style of webview to only be set when 'fusion' exists

Ryan Huffman committed 11 years ago

Commit 547b0e51 parent 6087a3e1 file · +5 −2Browse files

Showing the changes to interface/src/scripting/WebWindowClass.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/WebWindowClass.cpp+5−2
@@ -47,7 +47,6 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid · 46 unmodified lines
4747 dockWidget->setFeatures(QDockWidget::DockWidgetMovable);
4848
4949 _webView = new QWebView(dockWidget);
50− _webView->setStyle(QStyleFactory::create("fusion"));
5150 addEventBridgeToWindowObject();
5251
5352 dockWidget->setWidget(_webView);
@@ -66,7 +65,6 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid · 12 unmodified lines
6665 dialogWidget->setLayout(layout);
6766
6867 _webView = new QWebView(dialogWidget);
69− _webView->setStyle(QStyleFactory::create("fusion"));
7068
7169 layout->addWidget(_webView);
7270
@@ -75,6 +73,11 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid · 2 unmodified lines
7573 _windowWidget = dialogWidget;
7674 }
7775
76+ auto style = QStyleFactory::create("fusion");
77+ if (style) {
78+ _webView->setStyle(style);
79+ }
80+
7881 _webView->setPage(new DataWebPage());
7982 _webView->setUrl(url);
8083