diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-08 20:59:41 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-08 21:08:45 +0200 |
commit | 48448943317f89762559fe26d3a1701c6be0a9f2 (patch) | |
tree | 3ef09e8490a332d2340c18ad39f0e17b43c1fbb2 /src/webview.cpp | |
parent | Code cleanup (diff) | |
download | rekonq-48448943317f89762559fe26d3a1701c6be0a9f2.tar.xz |
- Use default scrolling for editable contents
- Smooth scrolling now follows QApplication::wheelScrollLines() but with a factor
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 70a432c7..35af8005 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -541,7 +541,7 @@ void WebView::keyPressEvent(QKeyEvent *event) void WebView::wheelEvent(QWheelEvent *event) { - if (!ReKonfig::smoothScrolling()) + if (!ReKonfig::smoothScrolling() || page()->currentFrame()->hitTestContent(event->pos()).isContentEditable()) KWebView::wheelEvent(event); // Sync with the zoom slider @@ -560,7 +560,7 @@ void WebView::wheelEvent(QWheelEvent *event) emit zoomChanged((qreal)newFactor / 10); } - else if ( ReKonfig::smoothScrolling() ) + else if ( ReKonfig::smoothScrolling() && !this->page()->currentFrame()->hitTestContent(event->pos()).isContentEditable()) { int numDegrees = event->delta() / 8; int numSteps = numDegrees / 15; @@ -573,7 +573,7 @@ void WebView::wheelEvent(QWheelEvent *event) else _scrollBottom = true; - setupSmoothScrolling(100); + setupSmoothScrolling(QApplication::wheelScrollLines() * 25); return; } |