From eb413f79e4fad08aa241323f61734224eb889500 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Wed, 10 Sep 2014 01:47:46 +0200 Subject: [PATCH] Fix the look of the block cursor at low resolutions. --- konsole-qml-plugin/src/TerminalDisplay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/konsole-qml-plugin/src/TerminalDisplay.cpp b/konsole-qml-plugin/src/TerminalDisplay.cpp index 79e1617..51fbd3d 100644 --- a/konsole-qml-plugin/src/TerminalDisplay.cpp +++ b/konsole-qml-plugin/src/TerminalDisplay.cpp @@ -2265,7 +2265,7 @@ void KTerminalDisplay::drawCursor(QPainter* painter, bool& invertCharacterColor) { QRectF cursorRect = rect; - cursorRect.setHeight(_fontHeight - _lineSpacing - 1); + cursorRect.setHeight(_fontHeight - _lineSpacing); if (!_cursorBlinking) { @@ -2280,8 +2280,8 @@ void KTerminalDisplay::drawCursor(QPainter* painter, // it is draw entirely inside 'rect' int penWidth = qMax(1,painter->pen().width()); - painter->drawRect(cursorRect.adjusted( penWidth/2, - penWidth/2, + painter->drawRect(cursorRect.adjusted( penWidth/2 + penWidth%2, + penWidth/2 + penWidth%2, - penWidth/2 - penWidth%2, - penWidth/2 - penWidth%2)); if ( hasFocus() )