From 69f729dbe5156330c4a866a78be6003ecb12c4d5 Mon Sep 17 00:00:00 2001 From: Austin Anderson Date: Sat, 9 May 2015 18:07:40 -0400 Subject: [PATCH] Added foreground color settings for statusbar messages. --- qutebrowser/config/configdata.py | 16 ++++++++++++++++ qutebrowser/mainwindow/statusbar/bar.py | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index e0e613892..d5ec8e9bd 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -804,18 +804,34 @@ def data(readonly=False): SettingValue(typ.QssColor(), 'red'), "Background color of the statusbar if there was an error."), + ('statusbar.fg.error', + SettingValue(typ.QssColor(), 'white'), + "Foreground color of the statusbar if there was an error."), + ('statusbar.bg.warning', SettingValue(typ.QssColor(), 'darkorange'), "Background color of the statusbar if there is a warning."), + ('statusbar.fg.warning', + SettingValue(typ.QssColor(), 'white'), + "Foreground color of the statusbar if there is a warning."), + ('statusbar.bg.prompt', SettingValue(typ.QssColor(), 'darkblue'), "Background color of the statusbar if there is a prompt."), + ('statusbar.fg.prompt', + SettingValue(typ.QssColor(), 'white'), + "Foreground color of the statusbar if there is a prompt."), + ('statusbar.bg.insert', SettingValue(typ.QssColor(), 'darkgreen'), "Background color of the statusbar in insert mode."), + ('statusbar.fg.insert', + SettingValue(typ.QssColor(), 'white'), + "Foreground color of the statusbar in insert mode."), + ('statusbar.progress.bg', SettingValue(typ.QssColor(), 'white'), "Background color of the progress bar."), diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py index a1c8aabd0..2a034223b 100644 --- a/qutebrowser/mainwindow/statusbar/bar.py +++ b/qutebrowser/mainwindow/statusbar/bar.py @@ -97,26 +97,47 @@ class StatusBar(QWidget): {{ color['statusbar.bg'] }} } + QWidget#StatusBar QLabel { + {{ color['statusbar.fg'] }} + } + QWidget#StatusBar[insert_active="true"] { {{ color['statusbar.bg.insert'] }} } + QWidget#StatusBar[insert_active="true"] QLabel { + {{ color['statusbar.fg.insert'] }} + } + QWidget#StatusBar[prompt_active="true"] { {{ color['statusbar.bg.prompt'] }} } + QWidget#StatusBar[prompt_active="true"] QLabel { + {{ color['statusbar.fg.prompt'] }} + } + QWidget#StatusBar[severity="error"] { {{ color['statusbar.bg.error'] }} } + QWidget#StatusBar[severity="error"] QLabel { + {{ color['statusbar.fg.error'] }} + } + QWidget#StatusBar[severity="warning"] { {{ color['statusbar.bg.warning'] }} } + QWidget#StatusBar[severity="warning"] QLabel { + {{ color['statusbar.fg.warning'] }} + } + QLabel, QLineEdit { {{ color['statusbar.fg'] }} {{ font['statusbar'] }} } + """ def __init__(self, win_id, parent=None):