[CI SKIP] update deb format
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
2026-02-01 19:35:52 +11:00
parent f4fd1b1b07
commit 3644001dbc
2 changed files with 11 additions and 10 deletions

View File

@@ -18,6 +18,7 @@
#include <QGraphicsPixmapItem>
#include <QApplication>
#include <QScreen>
#include <QTransform>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
@@ -170,11 +171,11 @@ void MainWindow::updateImage()
return;
QLabel *label = this->findChild<QLabel*>("image");
const QPixmap* oldImage = label->pixmap();
if (oldImage != NULL && transitionSeconds > 0)
QPixmap oldImage = label->pixmap(Qt::ReturnByValue);
if (!oldImage.isNull() && transitionSeconds > 0)
{
QPalette palette;
palette.setBrush(QPalette::Background, *oldImage);
palette.setBrush(QPalette::Window, oldImage);
this->setPalette(palette);
}
@@ -213,7 +214,7 @@ void MainWindow::updateImage()
label->setPixmap(background);
if (oldImage != NULL && transitionSeconds > 0)
if (!oldImage.isNull() && transitionSeconds > 0)
{
auto effect = new QGraphicsOpacityEffect(label);
effect->setOpacity(0.0);
@@ -273,9 +274,9 @@ QPixmap MainWindow::getBlurredBackground(const QPixmap& originalSize, const QPix
QPixmap MainWindow::getRotatedPixmap(const QPixmap& p)
{
QMatrix matrix;
matrix.rotate(currentImage.rotation);
return p.transformed(matrix);
QTransform transform;
transform.rotate(currentImage.rotation);
return p.transformed(transform);
}
QPixmap MainWindow::getScaledPixmap(const QPixmap& p)
@@ -325,12 +326,12 @@ void MainWindow::drawBackground(const QPixmap& originalSize, const QPixmap& scal
QPixmap background = blur(originalSize.scaledToHeight(height()));
QRect rect((background.width() - width())/2, 0, width(), height());
background = background.copy(rect);
palette.setBrush(QPalette::Background, background);
palette.setBrush(QPalette::Window, background);
} else {
QPixmap background = blur(originalSize.scaledToHeight(height()));
QRect rect((background.width() - width())/2, 0, width(), height());
background = background.copy(rect);
palette.setBrush(QPalette::Background, background);
palette.setBrush(QPalette::Window, background);
}
this->setPalette(palette);
}