diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-08-20 11:58:13 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-08-20 11:58:13 +0300 |
commit | 6d1f2ea9b315a585d8e7f704a653e3038e02f212 (patch) | |
tree | 9a0d6f70d870eaf17514802ac72ae156308c2bcd | |
parent | Fix crash on logout (diff) | |
download | nheko-6d1f2ea9b315a585d8e7f704a653e3038e02f212.tar.xz |
Remove pixel ratio from image scaling
-rw-r--r-- | src/Utils.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp index 35dc3b88..944fdcd5 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -234,12 +234,6 @@ utils::scaleDown(uint64_t maxWidth, uint64_t maxHeight, const QPixmap &source) if (source.isNull()) return QPixmap(); - const double pixelRatio = QApplication::desktop()->screen()->devicePixelRatioF(); - - // Take into account the scale factor of the screen. - maxWidth = std::ceil(pixelRatio * (double)maxWidth); - maxHeight = std::ceil(pixelRatio * (double)maxHeight); - const double widthRatio = (double)maxWidth / (double)source.width(); const double heightRatio = (double)maxHeight / (double)source.height(); const double minAspectRatio = std::min(widthRatio, heightRatio); |