diff --git a/lib/TerminalDisplay.cpp b/lib/TerminalDisplay.cpp index 07c3d33..7f1352b 100644 --- a/lib/TerminalDisplay.cpp +++ b/lib/TerminalDisplay.cpp @@ -754,7 +754,7 @@ void TerminalDisplay::drawCursor(QPainter& painter, const QColor& /*backgroundColor*/, bool& invertCharacterColor) { - QRect cursorRect = rect; + QRectF cursorRect = rect; cursorRect.setHeight(_fontHeight - _lineSpacing - 1); if (!_cursorBlinking) @@ -768,12 +768,12 @@ void TerminalDisplay::drawCursor(QPainter& painter, { // draw the cursor outline, adjusting the area so that // it is draw entirely inside 'rect' - int penWidth = qMax(1,painter.pen().width()); + float penWidth = qMax(1,painter.pen().width()); painter.drawRect(cursorRect.adjusted(penWidth/2, penWidth/2, - - penWidth/2 - penWidth%2, - - penWidth/2 - penWidth%2)); + - penWidth/2, + - penWidth/2)); if ( hasFocus() ) { painter.fillRect(cursorRect, _cursorColor.isValid() ? _cursorColor : foregroundColor);