Allow input -> mouse-zoom-divider to be 0

This commit is contained in:
Florian Bruhin 2017-02-22 05:15:57 +01:00
parent 77f475991d
commit e8443241df
3 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,7 @@ Changed
- Zoom level messages are now not stacked on top of each other anymore.
- qutebrowser now automatically uses QtWebEngine if QtWebKit is unavailable
- :history-clear now asks for a confirmation, unless it's run with --force.
- `input -> mouse-zoom-divider` can now be 0 to disable zooming by mouse wheel
Fixed
-----

View File

@ -120,6 +120,8 @@ class MouseEventFilter(QObject):
if e.modifiers() & Qt.ControlModifier:
divider = config.get('input', 'mouse-zoom-divider')
if divider == 0:
return False
factor = self._tab.zoom.factor() + (e.angleDelta().y() / divider)
if factor < 0:
return False

View File

@ -589,7 +589,7 @@ def data(readonly=False):
"disables the context menu."),
('mouse-zoom-divider',
SettingValue(typ.Int(minval=1), '512'),
SettingValue(typ.Int(minval=0), '512'),
"How much to divide the mouse wheel movements to translate them "
"into zoom increments."),