diff --git a/NEWS.md b/NEWS.md index 5de2adb5..c553c4d1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,6 +13,7 @@ Red Panda C++ Version 2.26 - change: Don't change caret position when ctrl+click. - fix: Should cd to working directory when debugging. - change: Ensure the line just below caret is visible while moving caret. + - change: Set mouse cursor to hand pointing when it's on gutter. Red Panda C++ Version 2.25 diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 364d6dee..f2bf4aa6 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -15,7 +15,7 @@ APP_NAME = RedPandaCPP APP_VERSION = 2.26 -TEST_VERSION = alpha3 +TEST_VERSION = alpha4 contains(QMAKE_HOST.arch, x86_64):{ DEFINES += ARCH_X86_64=1 diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 9454fb5e..6d13d5dc 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -712,7 +712,7 @@ void Editor::keyPressEvent(QKeyEvent *event) && !mCompletionPopup->isVisible() && !mHeaderCompletionPopup->isVisible() ) { - setMouseTracking(true); + //setMouseTracking(true); handled=true; QMouseEvent mouseEvent{ QEvent::MouseMove, @@ -1067,7 +1067,7 @@ void Editor::keyReleaseEvent(QKeyEvent *event) { if (event->modifiers() == Qt::NoModifier && event->key() == Qt::Key_Control) { - setMouseTracking(false); + //setMouseTracking(false); cancelHoverLink(); updateMouseCursor(); return; @@ -1943,7 +1943,7 @@ void Editor::onAutoBackupTimer() void Editor::onTooltipTimer() { - if (cursor() == Qt::PointingHandCursor) + if (mHoverModifiedLine != -1) return; QSynedit::BufferCoord p; diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 6c60201c..29af1fa4 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -156,7 +156,7 @@ QSynEdit::QSynEdit(QWidget *parent) : QAbstractScrollArea(parent), //enable input method setAttribute(Qt::WA_InputMethodEnabled); - //setMouseTracking(true); + setMouseTracking(true); setAcceptDrops(true); setFont(mFontDummy); @@ -5989,7 +5989,7 @@ void QSynEdit::updateMouseCursor(){ } else if (p.x() > mGutterWidth) { setCursor(Qt::IBeamCursor); } else { - setCursor(Qt::ArrowCursor); + setCursor(Qt::PointingHandCursor); } } @@ -6139,6 +6139,7 @@ bool QSynEdit::event(QEvent *event) void QSynEdit::focusInEvent(QFocusEvent *) { showCaret(); + updateMouseCursor(); } void QSynEdit::focusOutEvent(QFocusEvent *)