Merge branch 'nanjekyejoannah-master'

This commit is contained in:
Florian Bruhin 2016-08-01 14:38:11 +02:00
commit fca3c28134
6 changed files with 16 additions and 1 deletions

View File

@ -24,6 +24,8 @@ Added
did before v0.8.0. did before v0.8.0.
- New `:rl-unix-filename-rubout` command which is similar to readline's - New `:rl-unix-filename-rubout` command which is similar to readline's
`unix-filename-rubout`. `unix-filename-rubout`.
- New `fonts -> completion.category` setting to customize the font used for
completion category headers.
Changed Changed
~~~~~~~ ~~~~~~~

View File

@ -178,6 +178,7 @@ Contributors, sorted by the number of commits in descending order:
* error800 * error800
* Liam BEGUIN * Liam BEGUIN
* skinnay * skinnay
* nanjekyejoannah
* Zach-Button * Zach-Button
* Tomasz Kramkowski * Tomasz Kramkowski
* Ismail S * Ismail S

View File

@ -266,6 +266,7 @@
|Setting|Description |Setting|Description
|<<fonts-_monospace,_monospace>>|Default monospace fonts. |<<fonts-_monospace,_monospace>>|Default monospace fonts.
|<<fonts-completion,completion>>|Font used in the completion widget. |<<fonts-completion,completion>>|Font used in the completion widget.
|<<fonts-completion.category,completion.category>>|Font used in the completion categories.
|<<fonts-tabbar,tabbar>>|Font used in the tab bar. |<<fonts-tabbar,tabbar>>|Font used in the tab bar.
|<<fonts-statusbar,statusbar>>|Font used in the statusbar. |<<fonts-statusbar,statusbar>>|Font used in the statusbar.
|<<fonts-downloads,downloads>>|Font used for the downloadbar. |<<fonts-downloads,downloads>>|Font used for the downloadbar.
@ -2100,6 +2101,12 @@ Font used in the completion widget.
Default: +pass:[8pt ${_monospace}]+ Default: +pass:[8pt ${_monospace}]+
[[fonts-completion.category]]
=== completion.category
Font used in the completion categories.
Default: +pass:[bold ${completion}]+
[[fonts-tabbar]] [[fonts-tabbar]]
=== tabbar === tabbar
Font used in the tab bar. Font used in the tab bar.

View File

@ -206,7 +206,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
else: else:
self._doc.setPlainText(self._opt.text) self._doc.setPlainText(self._opt.text)
else: else:
self._doc.setHtml('<b>{}</b>'.format(html.escape(self._opt.text))) self._doc.setHtml(html.escape(self._opt.text))
def _draw_focus_rect(self): def _draw_focus_rect(self):
"""Draw the focus rectangle of an ItemViewItem.""" """Draw the focus rectangle of an ItemViewItem."""

View File

@ -69,6 +69,7 @@ class CompletionView(QTreeView):
{{ color['completion.category.border.top'] }}; {{ color['completion.category.border.top'] }};
border-bottom: 1px solid border-bottom: 1px solid
{{ color['completion.category.border.bottom'] }}; {{ color['completion.category.border.bottom'] }};
font: {{ font['completion.category'] }};
} }
QTreeView::item:selected, QTreeView::item:selected:hover { QTreeView::item:selected, QTreeView::item:selected:hover {

View File

@ -1244,6 +1244,10 @@ def data(readonly=False):
SettingValue(typ.Font(), DEFAULT_FONT_SIZE + ' ${_monospace}'), SettingValue(typ.Font(), DEFAULT_FONT_SIZE + ' ${_monospace}'),
"Font used in the completion widget."), "Font used in the completion widget."),
('completion.category',
SettingValue(typ.Font(), 'bold ${completion}'),
"Font used in the completion categories."),
('tabbar', ('tabbar',
SettingValue(typ.QtFont(), DEFAULT_FONT_SIZE + ' ${_monospace}'), SettingValue(typ.QtFont(), DEFAULT_FONT_SIZE + ' ${_monospace}'),
"Font used in the tab bar."), "Font used in the tab bar."),