2021-03-25 05:00:19 -07:00
|
|
|
#include "usbms_splash.h"
|
|
|
|
#include "ui_usbms_splash.h"
|
|
|
|
|
|
|
|
#include <QPixmap>
|
2021-03-29 05:04:46 -07:00
|
|
|
#include <QScreen>
|
2021-03-25 05:00:19 -07:00
|
|
|
|
|
|
|
usbms_splash::usbms_splash(QWidget *parent) :
|
|
|
|
QWidget(parent),
|
|
|
|
ui(new Ui::usbms_splash)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
2021-03-29 05:04:46 -07:00
|
|
|
// Getting the screen's size
|
|
|
|
float sW = QGuiApplication::screens()[0]->size().width();
|
|
|
|
float sH = QGuiApplication::screens()[0]->size().height();
|
|
|
|
|
2021-03-29 05:14:15 -07:00
|
|
|
// Defining what the default icon size will be
|
2021-03-29 05:04:46 -07:00
|
|
|
float stdIconWidth = sW / 1.15;
|
|
|
|
float stdIconHeight = sH / 1.15;
|
|
|
|
|
2021-03-25 05:00:19 -07:00
|
|
|
this->setStyleSheet("background-color:black;");
|
|
|
|
ui->label->setStyleSheet("QLabel { background-color : black; color : white; }");
|
|
|
|
ui->label_3->setStyleSheet("QLabel { background-color : black; color : white; font-size: 9pt}");
|
|
|
|
|
|
|
|
QPixmap pixmap(":/resources/usbms.png");
|
2021-03-29 05:04:46 -07:00
|
|
|
QPixmap scaledPixmap = pixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio);
|
|
|
|
ui->label_2->setPixmap(scaledPixmap);
|
2021-03-25 05:00:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
usbms_splash::~usbms_splash()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|