Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalDisplay.cpp
Show First 20 Lines • Show All 710 Lines • ▼ Show 20 Line(s) | 709 | if (hasFocus()) { | |||
---|---|---|---|---|---|
711 | 711 | | |||
712 | if (!_cursorColor.isValid()) { | 712 | if (!_cursorColor.isValid()) { | ||
713 | // invert the color used to draw the text to ensure that the character at | 713 | // invert the color used to draw the text to ensure that the character at | ||
714 | // the cursor position is readable | 714 | // the cursor position is readable | ||
715 | invertCharacterColor = true; | 715 | invertCharacterColor = true; | ||
716 | } | 716 | } | ||
717 | } | 717 | } | ||
718 | } else if (_cursorShape == Enum::UnderlineCursor) { | 718 | } else if (_cursorShape == Enum::UnderlineCursor) { | ||
719 | painter.drawLine(cursorRect.left(), | 719 | QLineF line(cursorRect.left() + 0.5, | ||
720 | cursorRect.bottom(), | 720 | cursorRect.bottom() - 0.5, | ||
721 | cursorRect.right(), | 721 | cursorRect.right() - 0.5, | ||
722 | cursorRect.bottom()); | 722 | cursorRect.bottom() - 0.5); | ||
723 | painter.drawLine(line); | ||||
723 | 724 | | |||
724 | } else if (_cursorShape == Enum::IBeamCursor) { | 725 | } else if (_cursorShape == Enum::IBeamCursor) { | ||
725 | painter.drawLine(cursorRect.left(), | 726 | QLineF line(cursorRect.left() + 0.5, | ||
726 | cursorRect.top(), | 727 | cursorRect.top() + 0.5, | ||
727 | cursorRect.left(), | 728 | cursorRect.left() + 0.5, | ||
728 | cursorRect.bottom()); | 729 | cursorRect.bottom() - 0.5); | ||
730 | painter.drawLine(line); | ||||
729 | } | 731 | } | ||
730 | } | 732 | } | ||
731 | 733 | | |||
732 | void TerminalDisplay::drawCharacters(QPainter& painter, | 734 | void TerminalDisplay::drawCharacters(QPainter& painter, | ||
733 | const QRect& rect, | 735 | const QRect& rect, | ||
734 | const QString& text, | 736 | const QString& text, | ||
735 | const Character* style, | 737 | const Character* style, | ||
736 | bool invertCharacterColor) | 738 | bool invertCharacterColor) | ||
▲ Show 20 Lines • Show All 3190 Lines • Show Last 20 Lines |