Commit bc386e19 authored by David Redondo's avatar David Redondo 🏎
Browse files

Fix colored characters being drawn italic

Seems like a typo happened when moving the code
parent 60b5e7e6
...@@ -455,7 +455,7 @@ namespace Konsole ...@@ -455,7 +455,7 @@ namespace Konsole
const bool useBold = (((style->rendition & RE_BOLD) != 0) && _display->_boldIntense); const bool useBold = (((style->rendition & RE_BOLD) != 0) && _display->_boldIntense);
const bool useUnderline = ((style->rendition & RE_UNDERLINE) != 0) || _display->font().underline(); const bool useUnderline = ((style->rendition & RE_UNDERLINE) != 0) || _display->font().underline();
const bool useItalic = ((style->rendition * RE_ITALIC) != 0) || _display->font().italic(); const bool useItalic = ((style->rendition & RE_ITALIC) != 0) || _display->font().italic();
const bool useStrikeOut = ((style->rendition & RE_STRIKEOUT) != 0) || _display->font().strikeOut(); const bool useStrikeOut = ((style->rendition & RE_STRIKEOUT) != 0) || _display->font().strikeOut();
const bool useOverline = ((style->rendition & RE_OVERLINE) != 0) || _display->font().overline(); const bool useOverline = ((style->rendition & RE_OVERLINE) != 0) || _display->font().overline();
...@@ -466,7 +466,7 @@ namespace Konsole ...@@ -466,7 +466,7 @@ namespace Konsole
|| currentFont.italic() != useItalic || currentFont.italic() != useItalic
|| currentFont.strikeOut() != useStrikeOut || currentFont.strikeOut() != useStrikeOut
|| currentFont.overline() != useOverline) { || currentFont.overline() != useOverline) {
currentFont.setWeight(useBold ? boldWeight : normalWeight); currentFont.setWeight(useBold ? boldWeight : normalWeight);
currentFont.setUnderline(useUnderline); currentFont.setUnderline(useUnderline);
currentFont.setItalic(useItalic); currentFont.setItalic(useItalic);
...@@ -502,9 +502,9 @@ namespace Konsole ...@@ -502,9 +502,9 @@ namespace Konsole
painter.setClipRegion(origClipRegion); painter.setClipRegion(origClipRegion);
painter.setClipping(origClipping); painter.setClipping(origClipping);
} }
void TerminalPainter::drawLineCharString(QPainter &painter, int x, int y, const QString &str, void TerminalPainter::drawLineCharString(QPainter &painter, int x, int y, const QString &str,
const Character *attributes) const Character *attributes)
{ {
painter.setRenderHint(QPainter::Antialiasing, _display->_antialiasText); painter.setRenderHint(QPainter::Antialiasing, _display->_antialiasText);
...@@ -516,13 +516,13 @@ namespace Konsole ...@@ -516,13 +516,13 @@ namespace Konsole
} }
painter.setRenderHint(QPainter::Antialiasing, false); painter.setRenderHint(QPainter::Antialiasing, false);
} }
void TerminalPainter::drawInputMethodPreeditString(QPainter &painter, const QRect &rect) void TerminalPainter::drawInputMethodPreeditString(QPainter &painter, const QRect &rect)
{ {
if (_display->_inputMethodData.preeditString.isEmpty() || !_display->isCursorOnDisplay()) { if (_display->_inputMethodData.preeditString.isEmpty() || !_display->isCursorOnDisplay()) {
return; return;
} }
const QPoint cursorPos = _display->cursorPosition(); const QPoint cursorPos = _display->cursorPosition();
QColor characterColor; QColor characterColor;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment