Fix rendering of U+2590 and U+2595

QRect::MoveLeft is the wrong operation. We really want QRect:setX,
in order to leave the right edge of the rectangle in the same position.
wilder
Matan Ziv-Av 4 years ago committed by Tomaz Canabrava
parent 26936151f0
commit e6f074b835
  1. 8
      src/characters/LineBlockCharacters.cpp

@ -647,19 +647,17 @@ static inline bool drawBlockCharacter(QPainter &paint, int x, int y, int w, int
paint.fillRect(rect, color);
return true;
case 0x90: // Right half block
rect.moveLeft(center.x());
rect.setX(center.x());
paint.fillRect(rect, color);
return true;
case 0x94: // Top one eighth block
rect.setHeight(h / 8.0);
paint.fillRect(rect, color);
return true;
case 0x95: { // Right one eighth block
const qreal width = 7 * w / 8.0;
rect.moveLeft(x + width);
case 0x95: // Right one eighth block
rect.setX(x + 7 * w / 8.0);
paint.fillRect(rect, color);
return true;
}
case 0x91: // Light shade
paint.fillRect(rect, lightShade);
return true;

Loading…
Cancel
Save