From 48448943317f89762559fe26d3a1701c6be0a9f2 Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Sun, 8 Aug 2010 20:59:41 +0200 Subject: - Use default scrolling for editable contents - Smooth scrolling now follows QApplication::wheelScrollLines() but with a factor --- src/webview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/webview.cpp') 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; } -- cgit v1.2.1