From e238719740a970a41ede83db548a668cfdc947eb Mon Sep 17 00:00:00 2001 From: Alfred Reynolds Date: Sun, 1 Aug 2021 13:46:19 +1200 Subject: [PATCH] - fix --stretch mode, we need to make sure the background texture matches the screen size, so when we composite the foreground in the drawForeground() we fil the screen --- src/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 804a212..6c0aa85 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -191,7 +191,10 @@ void MainWindow::setAspect(char aspectIn) 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)); QRect rect(0, (background.height() - height())/2, width(), height()); return background.copy(rect);