Fix background preview on retina screens.

This commit is contained in:
John Preston 2019-01-29 12:39:16 +03:00
parent 9b3c103f16
commit 2eb6848eb8
2 changed files with 5 additions and 5 deletions

View File

@ -88,8 +88,8 @@ QImage PrepareScaledNonPattern(
: (height * size / width);
return Images::prepare(
image,
takeWidth,
takeHeight,
takeWidth * cIntRetinaFactor(),
takeHeight * cIntRetinaFactor(),
Images::Option::Smooth
| Images::Option::TransparentBackground
| blur,
@ -141,7 +141,7 @@ QImage ColorizePattern(QImage image, QColor color) {
maskBytes += maskBytesAdded;
resultInts += resultIntsAdded;
}
return std::move(image);
return image;
}
QImage PrepareScaledFromFull(

View File

@ -120,7 +120,7 @@ QImage PreparePatternImage(QImage image, QColor bg, QColor fg, int intensity) {
fg.alphaF() * std::clamp(intensity / 100., 0., 1.));
if (!alpha) {
image.fill(bg);
return std::move(image);
return image;
}
fg.setAlpha(255);
const auto patternBg = anim::shifted(bg);
@ -158,7 +158,7 @@ QImage PreparePatternImage(QImage image, QColor bg, QColor fg, int intensity) {
maskBytes += maskBytesAdded;
resultInts += resultIntsAdded;
}
return std::move(image);
return image;
}
} // namespace