diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index d5cefaa76..266562bc3 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,8 @@ Added did before v0.8.0. - New `:rl-unix-filename-rubout` command which is similar to readline's `unix-filename-rubout`. +- New `fonts -> completion.category` setting to customize the font used for + completion category headers. Changed ~~~~~~~ diff --git a/README.asciidoc b/README.asciidoc index 3a8000c7c..96d246334 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -178,6 +178,7 @@ Contributors, sorted by the number of commits in descending order: * error800 * Liam BEGUIN * skinnay +* nanjekyejoannah * Zach-Button * Tomasz Kramkowski * Ismail S diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index d12fa472f..0b75d1fc0 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -266,6 +266,7 @@ |Setting|Description |<>|Default monospace fonts. |<>|Font used in the completion widget. +|<>|Font used in the completion categories. |<>|Font used in the tab bar. |<>|Font used in the statusbar. |<>|Font used for the downloadbar. @@ -2100,6 +2101,12 @@ Font used in the completion widget. Default: +pass:[8pt ${_monospace}]+ +[[fonts-completion.category]] +=== completion.category +Font used in the completion categories. + +Default: +pass:[bold ${completion}]+ + [[fonts-tabbar]] === tabbar Font used in the tab bar. diff --git a/qutebrowser/completion/completiondelegate.py b/qutebrowser/completion/completiondelegate.py index ab7b3ad88..d63658cc3 100644 --- a/qutebrowser/completion/completiondelegate.py +++ b/qutebrowser/completion/completiondelegate.py @@ -206,7 +206,7 @@ class CompletionItemDelegate(QStyledItemDelegate): else: self._doc.setPlainText(self._opt.text) else: - self._doc.setHtml('{}'.format(html.escape(self._opt.text))) + self._doc.setHtml(html.escape(self._opt.text)) def _draw_focus_rect(self): """Draw the focus rectangle of an ItemViewItem.""" diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py index 80e87dbe4..1ac49f28a 100644 --- a/qutebrowser/completion/completionwidget.py +++ b/qutebrowser/completion/completionwidget.py @@ -69,6 +69,7 @@ class CompletionView(QTreeView): {{ color['completion.category.border.top'] }}; border-bottom: 1px solid {{ color['completion.category.border.bottom'] }}; + font: {{ font['completion.category'] }}; } QTreeView::item:selected, QTreeView::item:selected:hover { diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 9506b2f70..4898c7ab1 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -1244,6 +1244,10 @@ def data(readonly=False): SettingValue(typ.Font(), DEFAULT_FONT_SIZE + ' ${_monospace}'), "Font used in the completion widget."), + ('completion.category', + SettingValue(typ.Font(), 'bold ${completion}'), + "Font used in the completion categories."), + ('tabbar', SettingValue(typ.QtFont(), DEFAULT_FONT_SIZE + ' ${_monospace}'), "Font used in the tab bar."),