Style CompletionView scrollbar
Doing this would mean adding some entries to the CompletionView stylesheet:
diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py
index 388c84b..e24b76b 100644
--- a/qutebrowser/completion/completionwidget.py
+++ b/qutebrowser/completion/completionwidget.py
@@ -81,6 +81,10 @@ class CompletionView(QTreeView):
QTreeView:item::hover {
border: 0px;
}
+
+ QTreeView QScrollBar {
+ {{ color['completion.bg'] }}
+ }
"""
# FIXME style scrollbar
This however looks bad because the shadows need customizing too. I also think those deserve their own entries in the config file.
See Customizing QScrollBar to see what can be customized.
I would suggest removing the add-line and sub-line all together, and allow the following:
completion.scrollbar.fg
completion.scrollbar.bg
completion.scrollbar.width
completion.scrollbar.padding
where fg refers to the handle, and bg the scrollbar. 'padding' would be the border width value of the scroll handle.
for example, with
completion.scrollbar.fg = #ffffff
completion.scrollbar.bg = #000000
completion.scrollbar.width = 12
completion.scrollbar.padding = 2
one would get:

my current style for this:
diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py
index 9281a05..3f81ee6 100644
--- a/qutebrowser/completion/completionwidget.py
+++ b/qutebrowser/completion/completionwidget.py
@@ -81,6 +81,21 @@ class CompletionView(QTreeView):
QTreeView:item::hover {
border: 0px;
}
+
+ QTreeView QScrollBar {
+ width: 12px;
+ background: #000000;
+ }
+
+ QTreeView QScrollBar::handle{
+ background: #ffffff;
+ border: 2px solid #000000;
+ }
+
+ QTreeView QScrollBar::sub-line, QScrollBar::add-line{
+ border: none;
+ background:none;
+ }
"""
# FIXME style scrollbar
an alternative setting(width=2, padding=0) would render:

thoughts?
Second one seems to match design trends perfectly.
@neeasade I like it. The default colours should probably be sourced from other ui elements though, eg. ${statusbar.fg} and ${statusbar.bg}.
@lamarpavel thanks - going with defaults of ${completion.fg} and ${completion.bg} in pull https://github.com/The-Compiler/qutebrowser/issues/1019 .