From 2bfa853847a66925650894cba0afea9b5ace08dc Mon Sep 17 00:00:00 2001 From: Martin Fraga Date: Thu, 19 Oct 2017 01:44:10 -0700 Subject: [PATCH] Add keyhint radius configuration option The radius for the keyhint dialog box should be configurable vi via c.keyhint.radius. The default was set to 6px, which is the previous hardcoded value. --- qutebrowser/config/configdata.yml | 7 +++++++ qutebrowser/misc/keyhintwidget.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 3d296fcaa..e5870e3fc 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -978,6 +978,13 @@ keyhint.blacklist: Globs are supported, so `;*` will blacklist all keychains starting with `;`. Use `*` to disable keyhints. +keyhint.radius: + type: + name: Int + minval: 0 + default: 6 + desc: The rounding radius for the edges of the keyhint dialog. + # emacs: ' keyhint.delay: diff --git a/qutebrowser/misc/keyhintwidget.py b/qutebrowser/misc/keyhintwidget.py index ce1f324e4..98dc8e275 100644 --- a/qutebrowser/misc/keyhintwidget.py +++ b/qutebrowser/misc/keyhintwidget.py @@ -54,9 +54,9 @@ class KeyHintView(QLabel): background-color: {{ conf.colors.keyhint.bg }}; padding: 6px; {% if conf.statusbar.position == 'top' %} - border-bottom-right-radius: 6px; + border-bottom-right-radius: {{ conf.keyhint.radius }}px; {% else %} - border-top-right-radius: 6px; + border-top-right-radius: {{ conf.keyhint.radius }}px; {% endif %} } """