Fix blurred background for small images.

Fixes #25707.
This commit is contained in:
John Preston 2023-01-12 11:42:45 +04:00
parent d346925b9d
commit 5cba1cdc64
1 changed files with 2 additions and 2 deletions

View File

@ -285,10 +285,10 @@ QImage PrepareBlurredBackground(QSize outer, QImage frame) {
const auto bsize = frame.size();
const auto copyw = std::min(
bsize.width(),
outer.width() * bsize.height() / outer.height());
std::max(outer.width() * bsize.height() / outer.height(), 1));
const auto copyh = std::min(
bsize.height(),
outer.height() * bsize.width() / outer.width());
std::max(outer.height() * bsize.width() / outer.width(), 1));
auto copy = (bsize == QSize(copyw, copyh))
? std::move(frame)
: frame.copy(