Specify completion category font in HTML
It seems like specifying a font for QTreeView::item in a Qt stylesheet doesn't actually do anything.
This commit is contained in:
parent
fca3c28134
commit
c421f44f4e
@ -206,7 +206,10 @@ class CompletionItemDelegate(QStyledItemDelegate):
|
||||
else:
|
||||
self._doc.setPlainText(self._opt.text)
|
||||
else:
|
||||
self._doc.setHtml(html.escape(self._opt.text))
|
||||
self._doc.setHtml(
|
||||
'<span style="font: {};">{}</span>'.format(
|
||||
html.escape(config.get('fonts', 'completion.category')),
|
||||
html.escape(self._opt.text)))
|
||||
|
||||
def _draw_focus_rect(self):
|
||||
"""Draw the focus rectangle of an ItemViewItem."""
|
||||
|
@ -69,7 +69,6 @@ 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user