Fix setting ui->default-zoom to a level not in ui->zoom-levels.
Fixes #296. See #115.
This commit is contained in:
parent
e8a6238028
commit
51fcfa07b0
@ -196,7 +196,7 @@ DATA = collections.OrderedDict([
|
||||
"The available zoom levels, separated by commas."),
|
||||
|
||||
('default-zoom',
|
||||
SettingValue(typ.ZoomPerc(), '100%'),
|
||||
SettingValue(typ.Perc(), '100%'),
|
||||
"The default zoom level."),
|
||||
|
||||
('message-timeout',
|
||||
|
@ -959,14 +959,6 @@ class ShellCommand(BaseType):
|
||||
return shlex.split(value)
|
||||
|
||||
|
||||
class ZoomPerc(Perc):
|
||||
|
||||
"""A percentage which needs to be in the current zoom percentages."""
|
||||
|
||||
# FIXME we should validate the percentage is in the list here.
|
||||
# https://github.com/The-Compiler/qutebrowser/issues/115
|
||||
|
||||
|
||||
class HintMode(BaseType):
|
||||
|
||||
"""Base class for the hints -> mode setting."""
|
||||
|
@ -157,9 +157,9 @@ class WebView(QWebView):
|
||||
def init_neighborlist(self):
|
||||
"""Initialize the _zoom neighborlist."""
|
||||
levels = config.get('ui', 'zoom-levels')
|
||||
default = config.get('ui', 'default-zoom')
|
||||
self._zoom = usertypes.NeighborList(
|
||||
levels, default, mode=usertypes.NeighborList.Modes.block)
|
||||
levels, mode=usertypes.NeighborList.Modes.block)
|
||||
self._zoom.fuzzyval = config.get('ui', 'default-zoom')
|
||||
|
||||
def _mousepress_backforward(self, e):
|
||||
"""Handle back/forward mouse button presses.
|
||||
|
Loading…
Reference in New Issue
Block a user