summaryrefslogtreecommitdiff
path: root/qutebrowser/config/qtargs.py
diff options
context:
space:
mode:
authorTed Morse <ekpneo@users.noreply.github.com>2020-11-29 10:58:27 -0800
committerTed Morse <ekpneo@users.noreply.github.com>2020-11-29 10:58:27 -0800
commit1f67527662a076aa0a3caf5348f9ba6b663f4a0e (patch)
tree1eb195c2b6f3832756aa5a439c5ae1a077033d59 /qutebrowser/config/qtargs.py
parent6d01062305e554f3d0e8989f0ba45c998c425ef1 (diff)
downloadqutebrowser-1f67527662a076aa0a3caf5348f9ba6b663f4a0e.tar.gz
qutebrowser-1f67527662a076aa0a3caf5348f9ba6b663f4a0e.zip
Only apply blink-settings on Qt 15.5.2
Turns out Qt 5.15.{0,1} also needs `--force-dark-mode`. This commit fixes it to only use the blink-setting on Qt 5.15.2 and up. It also parameterizes the tests better to test that the settings work on their respective Qt versions.
Diffstat (limited to 'qutebrowser/config/qtargs.py')
-rw-r--r--qutebrowser/config/qtargs.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/qutebrowser/config/qtargs.py b/qutebrowser/config/qtargs.py
index 663296bbc..2136f7e7f 100644
--- a/qutebrowser/config/qtargs.py
+++ b/qutebrowser/config/qtargs.py
@@ -204,10 +204,10 @@ def _qtwebengine_settings_args() -> Iterator[str]:
}
if (qtutils.version_check('5.14', compiled=False) and
- not qtutils.version_check('5.15', compiled=False)):
- # In Qt 5.14, `--force-dark-mode` is used to set the preferred
- # colorscheme. In Qt 5.15, this is handled by a blink-setting
- # instead.
+ not qtutils.version_check('5.15.2', compiled=False)):
+ # In Qt 5.14 to 5.15.1, `--force-dark-mode` is used to set the
+ # preferred colorscheme. In Qt 5.15.2, this is handled by a
+ # blink-setting instead.
settings['colors.webpage.prefers_color_scheme_dark'] = {
True: '--force-dark-mode',
False: None,