parent
fab6bc285c
commit
70ccdd86b2
@ -83,6 +83,7 @@
|
|||||||
|<<input-spatial-navigation,spatial-navigation>>|Enables or disables the Spatial Navigation feature
|
|<<input-spatial-navigation,spatial-navigation>>|Enables or disables the Spatial Navigation feature
|
||||||
|<<input-links-included-in-focus-chain,links-included-in-focus-chain>>|Whether hyperlinks should be included in the keyboard focus chain.
|
|<<input-links-included-in-focus-chain,links-included-in-focus-chain>>|Whether hyperlinks should be included in the keyboard focus chain.
|
||||||
|<<input-rocker-gestures,rocker-gestures>>|Whether to enable Opera-like mouse rocker gestures. This disables the context menu.
|
|<<input-rocker-gestures,rocker-gestures>>|Whether to enable Opera-like mouse rocker gestures. This disables the context menu.
|
||||||
|
|<<input-mouse-zoom-divider,mouse-zoom-divider>>|How much to divide the mouse wheel movements to translate them into zoom increments.
|
||||||
|==============
|
|==============
|
||||||
|
|
||||||
.Quick reference for section ``tabs''
|
.Quick reference for section ``tabs''
|
||||||
@ -785,6 +786,12 @@ Valid values:
|
|||||||
|
|
||||||
Default: +pass:[false]+
|
Default: +pass:[false]+
|
||||||
|
|
||||||
|
[[input-mouse-zoom-divider]]
|
||||||
|
=== mouse-zoom-divider
|
||||||
|
How much to divide the mouse wheel movements to translate them into zoom increments.
|
||||||
|
|
||||||
|
Default: +pass:[512]+
|
||||||
|
|
||||||
== tabs
|
== tabs
|
||||||
Configuration of the tab bar.
|
Configuration of the tab bar.
|
||||||
|
|
||||||
|
@ -527,3 +527,23 @@ class WebView(QWebView):
|
|||||||
menu = self.page().createStandardContextMenu()
|
menu = self.page().createStandardContextMenu()
|
||||||
self.shutting_down.connect(menu.close)
|
self.shutting_down.connect(menu.close)
|
||||||
menu.exec_(e.globalPos())
|
menu.exec_(e.globalPos())
|
||||||
|
|
||||||
|
def wheelEvent(self, e):
|
||||||
|
"""Zoom on Ctrl-Mousewheel.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
e: The QWheelEvent.
|
||||||
|
"""
|
||||||
|
if e.modifiers() & Qt.ControlModifier:
|
||||||
|
e.accept()
|
||||||
|
divider = config.get('input', 'mouse-zoom-divider')
|
||||||
|
factor = self.zoomFactor() + e.angleDelta().y() / divider
|
||||||
|
if factor < 0:
|
||||||
|
return
|
||||||
|
perc = int(100 * factor)
|
||||||
|
message.info(self.win_id, "Zoom level: {}%".format(perc))
|
||||||
|
self._zoom.fuzzyval = perc
|
||||||
|
self.setZoomFactor(factor)
|
||||||
|
self._default_zoom_changed = True
|
||||||
|
else:
|
||||||
|
super().wheelEvent(e)
|
||||||
|
@ -392,6 +392,11 @@ DATA = collections.OrderedDict([
|
|||||||
SettingValue(typ.Bool(), 'false'),
|
SettingValue(typ.Bool(), 'false'),
|
||||||
"Whether to enable Opera-like mouse rocker gestures. This disables "
|
"Whether to enable Opera-like mouse rocker gestures. This disables "
|
||||||
"the context menu."),
|
"the context menu."),
|
||||||
|
|
||||||
|
('mouse-zoom-divider',
|
||||||
|
SettingValue(typ.Int(minval=1), '512'),
|
||||||
|
"How much to divide the mouse wheel movements to translate them "
|
||||||
|
"into zoom increments."),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
('tabs', sect.KeyValue(
|
('tabs', sect.KeyValue(
|
||||||
|
Loading…
Reference in New Issue
Block a user