Merge branch 'master' into folder_options

This commit is contained in:
Alfred Reynolds
2021-08-01 13:48:25 +12:00

View File

@@ -152,7 +152,10 @@ void MainWindow::setOverlay(Overlay* o)
QPixmap MainWindow::getBlurredBackground(const QPixmap& originalSize, const QPixmap& scaled) QPixmap MainWindow::getBlurredBackground(const QPixmap& originalSize, const QPixmap& scaled)
{ {
if (scaled.width() < width()) { if (fitAspectAxisToWindow) {
// our scaled version will just fill the whole screen, us it directly
return scaled.copy();
} else if (scaled.width() < width()) {
QPixmap background = blur(originalSize.scaledToWidth(width(), Qt::SmoothTransformation)); QPixmap background = blur(originalSize.scaledToWidth(width(), Qt::SmoothTransformation));
QRect rect(0, (background.height() - height())/2, width(), height()); QRect rect(0, (background.height() - height())/2, width(), height());
return background.copy(rect); return background.copy(rect);