diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -1064,19 +1064,19 @@ // shift rectangle top down one pixel to leave some space // between top and bottom - QRect cursorRect = rect.adjusted(0, 1, 0, 0); + QRectF cursorRect = rect.adjusted(0, 1, 0, 0); QColor cursorColor = _cursorColor.isValid() ? _cursorColor : foregroundColor; painter.setPen(cursorColor); if (_cursorShape == Enum::BlockCursor) { // draw the cursor outline, adjusting the area so that // it is draw entirely inside 'rect' int penWidth = qMax(1, painter.pen().width()); - painter.drawRect(cursorRect.adjusted(penWidth / 2, - penWidth / 2, - - penWidth / 2 - penWidth % 2, - - penWidth / 2 - penWidth % 2)); + painter.drawRect(cursorRect.adjusted(penWidth / 2 + 0.5, + penWidth / 2 + 0.5, + - penWidth / 2 - penWidth % 2 + 0.5, + - penWidth / 2 - penWidth % 2 + 0.5)); // draw the cursor body only when the widget has focus if (hasFocus()) {