summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-08-08 20:59:41 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2010-08-08 21:08:45 +0200
commit48448943317f89762559fe26d3a1701c6be0a9f2 (patch)
tree3ef09e8490a332d2340c18ad39f0e17b43c1fbb2 /src/webview.cpp
parentCode cleanup (diff)
downloadrekonq-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.cpp6
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;
}