From b76ebd66e0c4eef89ef3be4b25f103613fdeedf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com> Date: Tue, 16 Jun 2009 12:15:33 +0200 Subject: [PATCH] Fixed the mouse cursor no longer turning into a hand above the mark area Reviewed-by: mae Reviewed-by: con --- src/plugins/texteditor/basetexteditor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 0841fca82de..c5e8703df4f 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -2770,6 +2770,13 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e) } } + // Set whether the mouse cursor is a hand or normal arrow + if (e->type() == QEvent::MouseMove) { + bool hand = (e->pos().x() <= markWidth); + if (hand != (d->m_extraArea->cursor().shape() == Qt::PointingHandCursor)) + d->m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor); + } + if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) { if (e->button() == Qt::LeftButton) { int boxWidth = collapseBoxWidth(fontMetrics()); -- GitLab