Commit e1c032f3 authored by con's avatar con
Browse files

Fix drawing of collapse block indicator (fractional font sizes).

Task-number: QTCREATORBUG-1319
Reviewed-by: Thorbjørn Lindeijer
parent 84123fb4
......@@ -2802,7 +2802,6 @@ static void drawRectBox(QPainter *painter, const QRect &rect, bool start, bool e
grad.setColorAt(0, c.lighter(110));
grad.setColorAt(1, c.lighter(130));
QColor outline = c;
QRect r = rect;
painter->fillRect(rect, grad);
painter->setPen(outline);
......@@ -2954,7 +2953,9 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e)
int boxWidth = collapseBoxWidth(fm);
if (hovered) {
QRect box = QRect(extraAreaWidth + 1, top, boxWidth - 2, bottom - top);
int itop = qRound(top);
int ibottom = qRound(bottom);
QRect box = QRect(extraAreaWidth + 1, itop, boxWidth - 2, ibottom - itop);
drawRectBox(&painter, box, drawStart, drawEnd, pal);
}
......
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