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