Refactoring to resolve issue #1395
This commit is contained in:
parent
212d5fe932
commit
1e94685653
@ -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('{}'.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."""
|
||||||
|
@ -69,7 +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: {{ config.get('completion', 'bold') }};
|
font: {{ font['completion.category'] }};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ SECTION_DESC = {
|
|||||||
|
|
||||||
|
|
||||||
DEFAULT_FONT_SIZE = '10pt' if sys.platform == 'darwin' else '8pt'
|
DEFAULT_FONT_SIZE = '10pt' if sys.platform == 'darwin' else '8pt'
|
||||||
|
orientation = 'bold'
|
||||||
|
|
||||||
|
|
||||||
def data(readonly=False):
|
def data(readonly=False):
|
||||||
@ -414,7 +415,7 @@ def data(readonly=False):
|
|||||||
('auto-open',
|
('auto-open',
|
||||||
SettingValue(typ.Bool(), 'true'),
|
SettingValue(typ.Bool(), 'true'),
|
||||||
"Automatically open completion when typing."),
|
"Automatically open completion when typing."),
|
||||||
|
|
||||||
('download-path-suggestion',
|
('download-path-suggestion',
|
||||||
SettingValue(
|
SettingValue(
|
||||||
typ.String(valid_values=typ.ValidValues(
|
typ.String(valid_values=typ.ValidValues(
|
||||||
@ -466,18 +467,6 @@ def data(readonly=False):
|
|||||||
SettingValue(typ.Int(minval=0), '2'),
|
SettingValue(typ.Int(minval=0), '2'),
|
||||||
"Padding of scrollbar handle in completion window (in px)."),
|
"Padding of scrollbar handle in completion window (in px)."),
|
||||||
|
|
||||||
('_monospace',
|
|
||||||
SettingValue(typ.Font(), 'Terminus, Monospace, '
|
|
||||||
'"DejaVu Sans Mono", Monaco, '
|
|
||||||
'"Bitstream Vera Sans Mono", "Andale Mono", '
|
|
||||||
'"Courier New", Courier, "Liberation Mono", '
|
|
||||||
'monospace, Fixed, Consolas, Terminal'),
|
|
||||||
"Default monospace fonts."),
|
|
||||||
|
|
||||||
('bold',
|
|
||||||
SettingValue(typ.Font(), 'bold' + DEFAULT_FONT_SIZE + ' ${_monospace}' ),
|
|
||||||
"Font used in the completion fonts."),
|
|
||||||
|
|
||||||
readonly=readonly
|
readonly=readonly
|
||||||
)),
|
)),
|
||||||
|
|
||||||
@ -1253,9 +1242,12 @@ def data(readonly=False):
|
|||||||
"Default monospace fonts."),
|
"Default monospace fonts."),
|
||||||
|
|
||||||
('completion',
|
('completion',
|
||||||
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 fonts."),
|
||||||
|
|
||||||
('tabbar',
|
('tabbar',
|
||||||
SettingValue(typ.QtFont(), DEFAULT_FONT_SIZE + ' ${_monospace}'),
|
SettingValue(typ.QtFont(), DEFAULT_FONT_SIZE + ' ${_monospace}'),
|
||||||
|
Loading…
Reference in New Issue
Block a user