- 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

This commit is contained in:
Alfred Reynolds
2021-08-01 13:46:19 +12:00
parent 75c50a4209
commit e238719740

View File

@@ -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);