Merge branch 'master' of ssh://the-compiler.org:2323/qutebrowser
This commit is contained in:
commit
bf6290cfc8
1
TODO
1
TODO
@ -10,6 +10,7 @@ Plugin architecture
|
||||
Ghostery/Disconnect?
|
||||
NoScript
|
||||
Certificate Patrol
|
||||
https://chrome.google.com/webstore/detail/remove-google-redirects/ccenmflbeofaceccfhhggbagkblihpoh
|
||||
Insert mode
|
||||
Extern editor
|
||||
Hints
|
||||
|
@ -149,6 +149,8 @@ class Config(ConfigParser):
|
||||
self.default_cp = ConfigParser()
|
||||
self.default_cp.optionxform = lambda opt: opt # be case-insensitive
|
||||
self.default_cp.read_string(default_config)
|
||||
if not self.configdir:
|
||||
return
|
||||
self.optionxform = lambda opt: opt # be case-insensitive
|
||||
self.configdir = configdir
|
||||
self.configfile = os.path.join(self.configdir, self.FNAME)
|
||||
|
@ -6,6 +6,7 @@ subclasses to provide completions.
|
||||
"""
|
||||
|
||||
import html
|
||||
import logging
|
||||
|
||||
from PyQt5.QtWidgets import (QTreeView, QStyledItemDelegate, QStyle,
|
||||
QStyleOptionViewItem, QSizePolicy)
|
||||
@ -91,13 +92,16 @@ class CompletionView(QTreeView):
|
||||
|
||||
e -- The QResizeEvent.
|
||||
"""
|
||||
super().resizeEvent(e)
|
||||
width = e.size().width()
|
||||
cols = self.model.columnCount()
|
||||
colwidth = int(width / cols)
|
||||
logging.debug('width {}, {} columns -> colwidth {}'.format(width, cols,
|
||||
colwidth))
|
||||
assert cols >= 1
|
||||
assert width / cols > 1
|
||||
assert colwidth > 1
|
||||
for i in range(cols):
|
||||
self.setColumnWidth(i, width / cols)
|
||||
super().resizeEvent(e)
|
||||
self.setColumnWidth(i, colwidth)
|
||||
|
||||
def setmodel(self, model):
|
||||
"""Switch completion to a new model.
|
||||
|
Loading…
Reference in New Issue
Block a user