Make the radius for prompt edges configurable

This commit is contained in:
Florian Bruhin 2016-10-26 20:11:41 +02:00
parent dff20ffe35
commit a33333eb41
2 changed files with 9 additions and 4 deletions

View File

@ -384,6 +384,10 @@ def data(readonly=False):
"Globs are supported, so ';*' will blacklist all keychains"
"starting with ';'. Use '*' to disable keyhints"),
('prompt-radius',
SettingValue(typ.Int(minval=0), '8'),
"The rounding radius for the edges of prompts."),
readonly=readonly
)),

View File

@ -80,13 +80,14 @@ class PromptContainer(QWidget):
"""
STYLESHEET = """
{% set prompt_radius = config.get('ui', 'prompt-radius') %}
QWidget#Prompt {
{% if config.get('ui', 'status-position') == 'top' %}
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: {{ prompt_radius }}px;
border-bottom-right-radius: {{ prompt_radius }}px;
{% else %}
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-top-left-radius: {{ prompt_radius }}px;
border-top-right-radius: {{ prompt_radius }}px;
{% endif %}
}