Customize prompt selection colors

Seems like if we make the foreground color configurable, the selection
isn't colored at all?!
This commit is contained in:
Florian Bruhin 2016-11-03 06:38:22 +01:00
parent ebcae3a69c
commit 2b46228e3d
3 changed files with 19 additions and 0 deletions

View File

@ -269,6 +269,7 @@
|<<colors-messages.border.info,messages.border.info>>|Border color of an info message.
|<<colors-prompts.fg,prompts.fg>>|Foreground color for prompts.
|<<colors-prompts.bg,prompts.bg>>|Background color for prompts.
|<<colors-prompts.selected.bg,prompts.selected.bg>>|Background color for the selected item in filename prompts.
|==============
.Quick reference for section ``fonts''
@ -2192,6 +2193,12 @@ Background color for prompts.
Default: +pass:[darkblue]+
[[colors-prompts.selected.bg]]
=== prompts.selected.bg
Background color for the selected item in filename prompts.
Default: +pass:[#308cc6]+
== fonts
Fonts used for the UI, with optional style/weight/size.

View File

@ -1310,6 +1310,10 @@ def data(readonly=False):
SettingValue(typ.QssColor(), 'darkblue'),
"Background color for prompts."),
('prompts.selected.bg',
SettingValue(typ.QssColor(), '#308cc6'),
"Background color for the selected item in filename prompts."),
readonly=readonly
)),

View File

@ -244,6 +244,14 @@ class PromptContainer(QWidget):
color: {{ color['prompts.fg'] }};
background-color: {{ color['prompts.bg'] }};
}
QTreeView {
selection-background-color: {{ color['prompts.selected.bg'] }};
}
QTreeView::item:selected, QTreeView::item:selected:hover {
background-color: {{ color['prompts.selected.bg'] }};
}
"""
update_geometry = pyqtSignal()