diff options
author | Jimmy <jimmy@spalge.com> | 2019-07-06 20:34:04 +1200 |
---|---|---|
committer | Jimmy <jimmy@spalge.com> | 2019-07-06 20:34:04 +1200 |
commit | 7d750137dfa7348c1515e88c8c1f9c3d16f8a3a1 (patch) | |
tree | b098c73cfdefdbee1ebce11fc61316756ee1426c | |
parent | 4b402de3d2ea9a7a31d07aed7760bd92aed73475 (diff) | |
download | qutebrowser-7d750137dfa7348c1515e88c8c1f9c3d16f8a3a1.tar.gz qutebrowser-7d750137dfa7348c1515e88c8c1f9c3d16f8a3a1.zip |
Fix colors.hints.match.fg with rgb() syntax.
The other hint colors are being set in a Qt stylesheet, this one isn't.
I turned it into a QtColor because that returns a QtColor out of the box
and I don't need to construct a new one. `QColor.name()` returns a #RRGGBB
string by default.
No need for escaping since we will be inserting a fixed format now.
This means colors.hints.match.fg will no longer support gradients, as
per the QssColor/QtColor docs. I thing that doesn't make sense for text
color anyway.
-rw-r--r-- | qutebrowser/browser/hints.py | 2 | ||||
-rw-r--r-- | qutebrowser/config/configdata.yml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 13c89ff6b..a46c67452 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -103,7 +103,7 @@ class HintLabel(QLabel): matched = html.escape(matched) unmatched = html.escape(unmatched) - match_color = html.escape(config.cache['colors.hints.match.fg']) + match_color = config.cache['colors.hints.match.fg'].name() if matched: self.setText('<font color="{}">{}</font>{}'.format( match_color, matched, unmatched)) diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index d4f66126f..50b8221a1 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -2078,7 +2078,7 @@ colors.hints.bg: colors.hints.match.fg: default: green - type: QssColor + type: QtColor desc: Font color for the matched part of hints. colors.keyhint.fg: |