summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Rohrbach <fxrh@gmx.de>2011-02-12 20:28:47 +0100
committerFelix Rohrbach <fxrh@gmx.de>2011-02-12 20:28:47 +0100
commitdc64aa2f10de89e2fcaa1f5a59001294d7e5bcc3 (patch)
tree1c67905a25dc3a644cbe9cd1a65f8de41910aeaa
parentRevert "highlights inactive tabs if title changes" (diff)
downloadrekonq-dc64aa2f10de89e2fcaa1f5a59001294d7e5bcc3.tar.xz
Reset webview's mouseicon if autoscroll is enabled and you reenter webview.
If you left the webview while autoscreen was enabled the mouseicon wasn't set to KIcon("transform-move") again. This patch fixes that. Patch by Johannes Tröscher, thanks! Reviewed by Rohan Garg and me. BUG: 262519 RB: 100637
-rw-r--r--src/webview.cpp9
-rw-r--r--src/webview.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index b41f1bd3..18c7a730 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -478,6 +478,15 @@ void WebView::mouseMoveEvent(QMouseEvent *event)
}
+void WebView::enterEvent(QEvent *event)
+{
+ if(m_isAutoScrollEnabled)
+ setCursor(KIcon("transform-move").pixmap(32));
+
+ KWebView::enterEvent(event);
+}
+
+
void WebView::dropEvent(QDropEvent *event)
{
if (event->mimeData()->hasFormat("application/rekonq-bookmark"))
diff --git a/src/webview.h b/src/webview.h
index 669705fa..3a37b082 100644
--- a/src/webview.h
+++ b/src/webview.h
@@ -58,6 +58,7 @@ protected:
void contextMenuEvent(QContextMenuEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
+ void enterEvent(QEvent *event);
void keyPressEvent(QKeyEvent *event);
void wheelEvent(QWheelEvent *event);
void dropEvent(QDropEvent *event);