From 8eaa387f21c582f8f64c1655dd096a24f97e7598 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 17 Aug 2016 20:17:17 +0200 Subject: [PATCH] Adjust default hint.bg gradient orientation --- doc/help/settings.asciidoc | 2 +- qutebrowser/config/config.py | 2 +- qutebrowser/config/configdata.py | 2 +- tests/unit/config/test_config.py | 2 +- tests/unit/config/test_configtypes.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 7f2041fcc..d121dd885 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -2047,7 +2047,7 @@ Default: +pass:[black]+ === hints.bg Background color for hints. Note that you can use a `rgba(...)` value for transparency. -Default: +pass:[qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 247, 133, 0.8), stop:1 rgba(255, 197, 66, 0.8))]+ +Default: +pass:[qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 247, 133, 0.8), stop:1 rgba(255, 197, 66, 0.8))]+ [[colors-hints.fg.match]] === hints.fg.match diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 931fbdabe..524a7ce7e 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -311,7 +311,7 @@ def _transform_hint_color(val): if not start_color.isValid() or not stop_color.isValid(): return None - return ('qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 {}, ' + return ('qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 {}, ' 'stop:1 {})'.format(to_rgba(start_color), to_rgba(stop_color))) else: diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 14f98e97a..ab2638ec4 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -1209,7 +1209,7 @@ def data(readonly=False): "Font color for hints."), ('hints.bg', - SettingValue(typ.QssColor(), 'qlineargradient(x1:0, y1:0, x2:1, ' + SettingValue(typ.QssColor(), 'qlineargradient(x1:0, y1:0, x2:0, ' 'y2:1, stop:0 rgba(255, 247, 133, 0.8), ' 'stop:1 rgba(255, 197, 66, 0.8))'), "Background color for hints. Note that you can use a `rgba(...)` " diff --git a/tests/unit/config/test_config.py b/tests/unit/config/test_config.py index e05f91f15..0194e4480 100644 --- a/tests/unit/config/test_config.py +++ b/tests/unit/config/test_config.py @@ -232,7 +232,7 @@ class TestTransformers: OLD_GRADIENT = ('-webkit-gradient(linear, left top, left bottom, ' 'color-stop(0%,{}), color-stop(100%,{}))') - NEW_GRADIENT = ('qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 {}, ' + NEW_GRADIENT = ('qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 {}, ' 'stop:1 {})') @pytest.mark.parametrize('val, expected', [ diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index 391ae757a..3ad579266 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -871,7 +871,7 @@ class ColorTests: ('hsva(359, 255, 255, 255)', [configtypes.QssColor]), ('hsv(10%, 10%, 10%)', [configtypes.QssColor]), ('hsv(10%,10%,10%)', [configtypes.QssColor]), - ('qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 white, ' + ('qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 white, ' 'stop: 0.4 gray, stop:1 green)', [configtypes.QssColor]), ('qconicalgradient(cx:0.5, cy:0.5, angle:30, stop:0 white, ' 'stop:1 #00FF00)', [configtypes.QssColor]),