Fixed implicit conversions from double to int warnings regarding
QPainter.drawRect()
This commit is contained in:
parent
314db1f464
commit
0022425687
3 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
|
|||
|
||||
painter->setBrush(QColor(220 * (activeAnimationCounter / 10.0), 220 * (activeAnimationCounter / 10.0), 220 * (activeAnimationCounter / 10.0)));
|
||||
painter->setPen(Qt::gray);
|
||||
painter->drawRect(0.5, 0.5, width - 1, width - 1);
|
||||
painter->drawRect(0, 0, width - 1, width - 1);
|
||||
painter->save();
|
||||
painter->resetTransform();
|
||||
painter->drawPixmap(iconPixmap.rect().translated(round(3 * scaleFactor), round(3 * scaleFactor)), iconPixmap, iconPixmap.rect());
|
||||
|
@ -47,7 +47,7 @@ void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
|
|||
|
||||
painter->setBrush(QColor(0, 0, 0, 255 * ((10 - activeAnimationCounter) / 15.0)));
|
||||
painter->setPen(Qt::gray);
|
||||
painter->drawRect(0.5, 0.5, width - 1, width - 1);
|
||||
painter->drawRect(0, 0, width - 1, width - 1);
|
||||
}
|
||||
|
||||
void PhaseButton::setWidth(double _width)
|
||||
|
|
|
@ -123,7 +123,7 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
|
|||
QPainter painter(&pixmap);
|
||||
svg.render(&painter, QRectF(0, 0, width, height));
|
||||
painter.setPen(Qt::black);
|
||||
painter.drawRect(0.5, 0.5, width - 1, height - 1);
|
||||
painter.drawRect(0, 0, width - 1, height - 1);
|
||||
|
||||
pmCache.insert(key, pixmap);
|
||||
return pixmap;
|
||||
|
|
|
@ -77,7 +77,7 @@ void ToggleButton::paintEvent(QPaintEvent *event)
|
|||
painter.setPen(QPen(Qt::green, 3));
|
||||
else
|
||||
painter.setPen(QPen(Qt::red, 3));
|
||||
painter.drawRect(1.5, 1.5, width() - 3, height() - 3);
|
||||
painter.drawRect(1, 1, width() - 3, height() - 3);
|
||||
}
|
||||
|
||||
void ToggleButton::setState(bool _state)
|
||||
|
|
Loading…
Reference in a new issue