diff --git a/src/Utils.cpp b/src/Utils.cpp index 809ea293..e4ca92d6 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include @@ -221,7 +222,8 @@ utils::scaleImageToPixmap(const QImage &img, int size) if (img.isNull()) return QPixmap(); - const int sz = QApplication::desktop()->screen()->devicePixelRatio() * size; + const double sz = + ceil(QApplication::desktop()->screen()->devicePixelRatioF() * (double)size); return QPixmap::fromImage( img.scaled(sz, sz, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); }