summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-02 17:39:35 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-02 17:39:35 +0200
commit1bcb6b3509ee9396d45ab9a400764586ffb29594 (patch)
treea5a35b8d57c64fcacb383bdf80765fc58e31e9b7 /src
parentPreviews are now always completely removed when clicking the x (diff)
downloadrekonq-1bcb6b3509ee9396d45ab9a400764586ffb29594.tar.xz
more gentle autoscroll..
less intrusive scrollTimer
Diffstat (limited to 'src')
-rw-r--r--src/webview.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 294b7c85..6e3718e0 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -86,7 +86,7 @@ WebView::WebView(QWidget* parent)
// scrolling timer
connect(_scrollTimer, SIGNAL(timeout()), this, SLOT(scrollFrameChanged()));
- _scrollTimer->setInterval(50);
+ _scrollTimer->setInterval(100);
}
@@ -426,34 +426,38 @@ void WebView::keyPressEvent(QKeyEvent *event)
}
}
+ // Auto Scrolling
if ( event->modifiers() == Qt::ShiftModifier )
{
- kDebug() << "scrolling..";
if( event->key() == Qt::Key_Up )
{
- _VScrollSpeed -= 1;
- _scrollTimer->start();
+ _VScrollSpeed--;
+ if( !_scrollTimer->isActive() )
+ _scrollTimer->start();
return;
}
if( event->key() == Qt::Key_Down )
{
- _VScrollSpeed += 1;
- _scrollTimer->start();
+ _VScrollSpeed++;
+ if( !_scrollTimer->isActive() )
+ _scrollTimer->start();
return;
}
if( event->key() == Qt::Key_Right )
{
- _HScrollSpeed += 1;
- _scrollTimer->start();
+ _HScrollSpeed++;
+ if( !_scrollTimer->isActive() )
+ _scrollTimer->start();
return;
}
if( event->key() == Qt::Key_Left )
{
- _HScrollSpeed -= 1;
- _scrollTimer->start();
+ _HScrollSpeed--;
+ if( !_scrollTimer->isActive() )
+ _scrollTimer->start();
return;
}