Make completion height configurable
This commit is contained in:
parent
9568be3d2a
commit
9318558eb6
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
[general]
|
[general]
|
||||||
# show_completion: bool, whether to show the autocompletion window or not.
|
# show_completion: bool, whether to show the autocompletion window or not.
|
||||||
|
# completion_height: the height of the completion, in pixels
|
||||||
# ignorecase: bool, whether to do case-insensitive searching.
|
# ignorecase: bool, whether to do case-insensitive searching.
|
||||||
# wrapsearch: bool, whether to wrap search to the top when arriving at the end.
|
# wrapsearch: bool, whether to wrap search to the top when arriving at the end.
|
||||||
# startpage: The default pages to open at the start, multiple pages can be
|
# startpage: The default pages to open at the start, multiple pages can be
|
||||||
@ -26,6 +27,7 @@
|
|||||||
# dns: Use DNS matching (might be slow)
|
# dns: Use DNS matching (might be slow)
|
||||||
# false: Never search automatically
|
# false: Never search automatically
|
||||||
show_completion = true
|
show_completion = true
|
||||||
|
completion_height = 400
|
||||||
ignorecase = true
|
ignorecase = true
|
||||||
wrapsearch = true
|
wrapsearch = true
|
||||||
startpage = http://www.duckduckgo.com/
|
startpage = http://www.duckduckgo.com/
|
||||||
|
@ -94,7 +94,8 @@ class CompletionView(QTreeView):
|
|||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self._height = QPoint(0, 200) # FIXME make that configurable
|
height = int(config.config.get('general', 'completion_height'))
|
||||||
|
self._height = QPoint(0, height)
|
||||||
self._enabled = config.config.getboolean('general', 'show_completion')
|
self._enabled = config.config.getboolean('general', 'show_completion')
|
||||||
self._completion_models = {}
|
self._completion_models = {}
|
||||||
self._completion_models[''] = None
|
self._completion_models[''] = None
|
||||||
|
Loading…
Reference in New Issue
Block a user