|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
#include <QProcess>
|
|
|
|
|
#include <QScreen>
|
|
|
|
|
#include "installerprompt.h"
|
|
|
|
|
#include "./ui_installerprompt.h"
|
|
|
|
|
|
|
|
|
@ -8,13 +9,22 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
|
|
// Set the background image, and let it change with the release
|
|
|
|
|
// Set the background image and scale it
|
|
|
|
|
QPixmap bg("../img/background.png");
|
|
|
|
|
bg = bg.scaled(this->size(), Qt::IgnoreAspectRatio);
|
|
|
|
|
QScreen *screen = QGuiApplication::primaryScreen();
|
|
|
|
|
QRect screenGeometry = screen->geometry();
|
|
|
|
|
|
|
|
|
|
int height = screenGeometry.height();
|
|
|
|
|
int width = screenGeometry.width();
|
|
|
|
|
bg = bg.scaled(width, height, Qt::KeepAspectRatio);
|
|
|
|
|
|
|
|
|
|
QPalette palette;
|
|
|
|
|
palette.setBrush(QPalette::Window, bg);
|
|
|
|
|
this->setPalette(palette);
|
|
|
|
|
|
|
|
|
|
// Resize the layout widget to the screen size.
|
|
|
|
|
ui->gridLayoutWidget->resize(width, height);
|
|
|
|
|
|
|
|
|
|
// Set the button colors
|
|
|
|
|
QString css = "background-color: rgba(0, 104, 200, 100); color: white; border-radius: 15px;";
|
|
|
|
|
ui->tryLubuntu->setAttribute(Qt::WA_TranslucentBackground);
|
|
|
|
|