From 8474ae6b8fc390e55b7b8203c501365debbe370f Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Wed, 7 Sep 2022 15:08:31 +0800 Subject: [PATCH] - fix: the size of horizontal caret is wrong --- NEWS.md | 1 + RedPandaIDE/qsynedit/SynEdit.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index bdc87292..96437694 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,7 @@ Red Panda C++ Version 1.3 - change: reduce time intervals for selection by mouse - enhancement: change orders of the problems in the problem set panel by drag&drop - enhancement: change orders of the problem cases in the problem panel by drag&drop + - fix: the size of horizontal caret is wrong Red Panda C++ Version 1.2 diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp index 1e18746d..d5340a39 100644 --- a/RedPandaIDE/qsynedit/SynEdit.cpp +++ b/RedPandaIDE/qsynedit/SynEdit.cpp @@ -3971,7 +3971,7 @@ void SynEdit::paintCaret(QPainter &painter, const QRect rcClip) QRect caretRC; int size = std::max(1,mTextHeight/15); caretRC.setLeft(rcClip.left()); - caretRC.setTop(rcClip.bottom()-1+size); + caretRC.setTop(rcClip.bottom()-1-size); caretRC.setBottom(rcClip.bottom()-1); caretRC.setRight(rcClip.right()); painter.fillRect(caretRC,caretColor);