Switch Qt style to Fusion on OS X on Qt 5.4.
Fixes #462. See #459. Upstream bugs: https://bugreports.qt.io/browse/QTBUG-42948 https://bugreports.qt.io/browse/QTBUG-43070
This commit is contained in:
parent
3ba202d467
commit
3eac528716
@ -19,11 +19,12 @@
|
|||||||
|
|
||||||
"""The main browser widgets."""
|
"""The main browser widgets."""
|
||||||
|
|
||||||
|
import sys
|
||||||
import itertools
|
import itertools
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer, QUrl
|
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer, QUrl
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication, QStyleFactory
|
||||||
from PyQt5.QtWebKit import QWebSettings
|
from PyQt5.QtWebKit import QWebSettings
|
||||||
from PyQt5.QtWebKitWidgets import QWebView, QWebPage
|
from PyQt5.QtWebKitWidgets import QWebView, QWebPage
|
||||||
|
|
||||||
@ -85,6 +86,10 @@ class WebView(QWebView):
|
|||||||
|
|
||||||
def __init__(self, win_id, parent=None):
|
def __init__(self, win_id, parent=None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
if sys.platform == 'darwin' and qtutils.version_check('5.4'):
|
||||||
|
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-42948
|
||||||
|
# See https://github.com/The-Compiler/qutebrowser/issues/462
|
||||||
|
self.setStyle(QStyleFactory.create('Fusion'))
|
||||||
self._win_id = win_id
|
self._win_id = win_id
|
||||||
self.load_status = LoadStatus.none
|
self.load_status = LoadStatus.none
|
||||||
self._check_insertmode = False
|
self._check_insertmode = False
|
||||||
|
Loading…
Reference in New Issue
Block a user