Fix conversion warnings when setting alpha to QColor
Adapt to 5bb4baae03.
Change-Id: Id65f87740f9de8e0d3624ff63c431dcad642f3a5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
bb10
parent
6ca50b79bc
commit
978a43ad4d
|
|
@ -1017,7 +1017,7 @@ QPixmap QItemDelegate::selectedPixmap(const QPixmap &pixmap, const QPalette &pal
|
|||
|
||||
QColor color = palette.color(enabled ? QPalette::Normal : QPalette::Disabled,
|
||||
QPalette::Highlight);
|
||||
color.setAlphaF((qreal)0.3);
|
||||
color.setAlphaF(0.3f);
|
||||
|
||||
QPainter painter(&img);
|
||||
painter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
|
||||
|
|
|
|||
|
|
@ -5388,7 +5388,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
|
|||
#endif
|
||||
QPainter p(q);
|
||||
QColor tint = q->palette().window().color();
|
||||
tint.setAlphaF(qreal(.6));
|
||||
tint.setAlphaF(.6f);
|
||||
p.fillRect(toBePainted.boundingRect(), tint);
|
||||
#ifndef QT_NO_OPENGL
|
||||
endBackingStorePainting();
|
||||
|
|
|
|||
|
|
@ -6435,7 +6435,7 @@ QPixmap QCommonStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &p
|
|||
case QIcon::Selected: {
|
||||
QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
QColor color = opt->palette.color(QPalette::Normal, QPalette::Highlight);
|
||||
color.setAlphaF(qreal(0.3));
|
||||
color.setAlphaF(0.3f);
|
||||
QPainter painter(&img);
|
||||
painter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
|
||||
painter.fillRect(0, 0, img.width(), img.height(), color);
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ void drawDial(const QStyleOptionSlider *option, QPainter *painter)
|
|||
|
||||
QPointF dp = calcRadialPos(option, qreal(0.70));
|
||||
buttonColor = buttonColor.lighter(104);
|
||||
buttonColor.setAlphaF(qreal(0.8));
|
||||
buttonColor.setAlphaF(0.8f);
|
||||
const qreal ds = r/qreal(7.0);
|
||||
QRectF dialRect(dp.x() - ds, dp.y() - ds, 2*ds, 2*ds);
|
||||
QRadialGradient dialGradient(dialRect.center().x() + dialRect.width()/2,
|
||||
|
|
|
|||
Loading…
Reference in New Issue