This commit is contained in:
Max-Wilhelm Bruker 2009-12-15 17:19:49 +01:00
parent 564ae4db84
commit 2aa5c7eb3c

View file

@ -7,7 +7,7 @@ QPixmap PingPixmapGenerator::generatePixmap(int size, int value, int max)
pixmap.fill(Qt::transparent);
QPainter painter(&pixmap);
QColor color;
if (max == -1)
if ((max == -1) || (value == -1))
color = Qt::black;
else
color.setHsv(120 * (1.0 - ((double) value / max)), 255, 255);