Replace all uses of devicePixelRatio with devicePixelRatioF

This commit is contained in:
Luis Ángel San Martín
2022-01-14 19:22:50 +01:00
parent 380aea2a66
commit 565bc3a5d0
5 changed files with 11 additions and 11 deletions

View File

@ -25,12 +25,12 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n /*ame*/, QStrin
// TODO fix this crazy hack for having a propper retina icon for the options
// this hack has been perpetrated using Qt 5.5.0
QString sourceOptionsImage;
if (devicePixelRatio() > 1)
if (devicePixelRatioF() > 1)
sourceOptionsImage = ":/images/sidebar/libraryOptions@2x.png";
else
sourceOptionsImage = ":/images/sidebar/libraryOptions.png";
QPixmap iconOptionsPixmap(sourceOptionsImage);
iconOptionsPixmap.setDevicePixelRatio(devicePixelRatio());
iconOptionsPixmap.setDevicePixelRatio(devicePixelRatioF());
QLabel *helperLabel = new QLabel(options);
helperLabel->move(4, 2);
helperLabel->setFixedSize(14, 14);