|
|
@ -1,4 +1,5 @@
|
|
|
|
#include <QProcess>
|
|
|
|
#include <QProcess>
|
|
|
|
|
|
|
|
#include <QScreen>
|
|
|
|
#include "installerprompt.h"
|
|
|
|
#include "installerprompt.h"
|
|
|
|
#include "./ui_installerprompt.h"
|
|
|
|
#include "./ui_installerprompt.h"
|
|
|
|
|
|
|
|
|
|
|
@ -8,13 +9,22 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
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");
|
|
|
|
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;
|
|
|
|
QPalette palette;
|
|
|
|
palette.setBrush(QPalette::Window, bg);
|
|
|
|
palette.setBrush(QPalette::Window, bg);
|
|
|
|
this->setPalette(palette);
|
|
|
|
this->setPalette(palette);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Resize the layout widget to the screen size.
|
|
|
|
|
|
|
|
ui->gridLayoutWidget->resize(width, height);
|
|
|
|
|
|
|
|
|
|
|
|
// Set the button colors
|
|
|
|
// Set the button colors
|
|
|
|
QString css = "background-color: rgba(0, 104, 200, 100); color: white; border-radius: 15px;";
|
|
|
|
QString css = "background-color: rgba(0, 104, 200, 100); color: white; border-radius: 15px;";
|
|
|
|
ui->tryLubuntu->setAttribute(Qt::WA_TranslucentBackground);
|
|
|
|
ui->tryLubuntu->setAttribute(Qt::WA_TranslucentBackground);
|
|
|
|