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

Task-number: QTCREATORBUG-1319
Reviewed-by: Thorbjørn Lindeijer
This commit is contained in:
con
2010-05-06 15:26:55 +02:00
parent 84123fb400
commit e1c032f325

View File

@@ -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);
}