Revert "Reimplement wheelEvent of WebView to fix scrolling"

This helped with hiding scrollbars, but it handles scrolling incorrectly
with multiple scrollable divs.

This reverts commit 5c4ce7ae09.
This commit is contained in:
Florian Bruhin 2014-05-19 09:46:38 +02:00
parent a795b24d86
commit 696fdc397b
2 changed files with 1 additions and 19 deletions

View File

@ -280,10 +280,6 @@ DATA = OrderedDict([
('forward-unbound-keys',
SettingValue(types.Bool(), 'false'),
"Whether to forward unbound keys to the website in normal mode."),
('scroll-amount',
SettingValue(types.Float(minval=0), '0.5'),
"How many pixels to scroll per 1/8 degree mousewheel delta."),
)),
('tabbar', sect.KeyValue(

View File

@ -20,7 +20,7 @@
import logging
import functools
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QPoint
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWebKit import QWebSettings
from PyQt5.QtWebKitWidgets import QWebView, QWebPage
@ -535,17 +535,3 @@ class WebView(QWebView):
self._mousepress_insertmode(e)
self._mousepress_opentarget(e)
return super().mousePressEvent(e)
def wheelEvent(self, e):
"""Override wheelEvent because we handle scrolling ourselves.
WebKit's scrolling doesn't allow us to scroll while scrollbars are
enabled...
"""
if not e.pixelDelta().isNull():
delta = QPoint(e.pixelDelta())
else:
delta = e.angleDelta() * config.get('input', 'scroll-amount')
frame = self.page_.currentFrame()
pos = frame.scrollPosition() - delta
frame.setScrollPosition(pos)