QmlJSInspector: Fixed the border around the color icon

It was being drawn one pixel too large, showing some garbage pixels.
This commit is contained in:
Thorbjørn Lindeijer
2011-02-17 12:21:40 +01:00
parent bd92874c29
commit 07014f82a0

View File

@@ -411,8 +411,8 @@ void QmlJSPropertyInspector::setColorIcon(int row)
QPainter p(&colorpix); QPainter p(&colorpix);
p.fillRect(1,1,recomendedLength-2,recomendedLength-2, color); p.fillRect(1,1,recomendedLength-2,recomendedLength-2, color);
p.setPen(Qt::black); p.setPen(Qt::black);
p.drawRect(0,0,recomendedLength, recomendedLength); p.drawRect(0, 0, recomendedLength - 1, recomendedLength - 1);
item->setIcon(QIcon(colorpix)); item->setIcon(colorpix);
} }
void QmlJSPropertyInspector::contextMenuEvent(QContextMenuEvent *ev) void QmlJSPropertyInspector::contextMenuEvent(QContextMenuEvent *ev)