summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Roden-Corrent <ryan@rcorre.net>2017-12-18 07:58:26 -0500
committerRyan Roden-Corrent <ryan@rcorre.net>2017-12-18 08:42:22 -0500
commitef2de8201a7f06c2f5ca8079af40beeb1fa8951f (patch)
tree6ca7d1a9e47c4941e9fc6b3ecce368166583a82d
parent31c29886932fb007fb704aa9183e8d75f7cfe5b9 (diff)
downloadqutebrowser-ef2de8201a7f06c2f5ca8079af40beeb1fa8951f.tar.gz
qutebrowser-ef2de8201a7f06c2f5ca8079af40beeb1fa8951f.zip
Fix colors.completion.fg default and description.
Update the description to mention the number of columns and change the default to ["white", "white", "white"] to make it more obvious that multiple colors can be specified. This also satisfies the config test that expects the default value for ListOrValue types to be a list. One other test had to be tweaked to use a config option that is still just a QtColor rather than a ListOrValue. While it is possible to provide just two colors, it is "undefined behavior". It will use the first color as the third color, but that is an artifact of the implementation and therefore not documented (though also not an error, as it is harmless).
-rw-r--r--qutebrowser/config/configdata.yml6
-rw-r--r--tests/unit/config/test_config.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml
index 6d8812c25..aca0311fd 100644
--- a/qutebrowser/config/configdata.yml
+++ b/qutebrowser/config/configdata.yml
@@ -1540,15 +1540,15 @@ zoom.text_only:
## colors
colors.completion.fg:
- default: white
+ default: ["white", "white", "white"]
type:
name: ListOrValue
valtype: QtColor
desc: >-
Text color of the completion widget.
- May be a single value to specify the color for all columns, or a list
- specifying a different color for each column.
+ May be a single color to use for all columns or a list of three colors,
+ one for each column.
colors.completion.odd.bg:
default: '#444444'
diff --git a/tests/unit/config/test_config.py b/tests/unit/config/test_config.py
index 93686e600..d8bf73700 100644
--- a/tests/unit/config/test_config.py
+++ b/tests/unit/config/test_config.py
@@ -400,7 +400,7 @@ class TestConfig:
assert not conf._mutables
def test_get_obj_simple(self, conf):
- assert conf.get_obj('colors.completion.fg') == 'white'
+ assert conf.get_obj('colors.completion.category.fg') == 'white'
@pytest.mark.parametrize('option', ['content.headers.custom',
'keyhint.blacklist',