diff --git a/bin/app/data/gui/about/about.css b/bin/app/data/gui/about/about.css new file mode 100644 index 00000000..1dd221a0 --- /dev/null +++ b/bin/app/data/gui/about/about.css @@ -0,0 +1,23 @@ +* { + color: white; + font-size: 12px; + font-weight: 100; +} + +#small { + font-size: 12px; +} + +#closeButton { + background: transparent; + border: none; + color: white; + font-size: 14pt; + height: 20px; + width: 20px; +} + +#closeButton:hover { + border: 2px solid white; + border-radius: 10px; +} diff --git a/bin/app/data/gui/about/logo.png b/bin/app/data/gui/about/logo.png new file mode 100644 index 00000000..cc6f329b Binary files /dev/null and b/bin/app/data/gui/about/logo.png differ diff --git a/bin/app/data/gui/about/logo_fhs.png b/bin/app/data/gui/about/logo_fhs.png new file mode 100644 index 00000000..3ddb6e50 Binary files /dev/null and b/bin/app/data/gui/about/logo_fhs.png differ diff --git a/src/app/qt/window/QtAbout.cpp b/src/app/qt/window/QtAbout.cpp index 69539452..4c38317b 100644 --- a/src/app/qt/window/QtAbout.cpp +++ b/src/app/qt/window/QtAbout.cpp @@ -3,7 +3,11 @@ #include #include #include +#include +#include +#include "qt/utility/QtDeviceScaledPixmap.h" +#include "qt/utility/utilityQt.h" #include "utility/Version.h" QtAbout::QtAbout(QWidget *parent) @@ -14,39 +18,84 @@ QtAbout::QtAbout(QWidget *parent) QSize QtAbout::sizeHint() const { - return QSize(500,500); + return QSize(370, 550); } void QtAbout::setup() { - setupForm(); + m_window->setStyleSheet( + m_window->styleSheet() + + "#SettingWindow { " + "background: qlineargradient( x1:0 y1:0.4, x2:0 y2:1, stop:0 #2F3F86, stop:1 #1C7BBC );" + "border: none;" + "}" + ); - updateTitle("About Coati"); - updateDoneButton("Ok"); - hideCancelButton(true); -} + setStyleSheet(utility::getStyleSheet("data/gui/about/about.css").c_str()); + + QtDeviceScaledPixmap coatiLogo("data/gui/about/logo.png"); + coatiLogo.scaleToWidth(180); + QLabel* coatiLogoLabel = new QLabel(this); + coatiLogoLabel->setPixmap(coatiLogo.pixmap()); + coatiLogoLabel->resize(coatiLogo.width(), coatiLogo.height()); + coatiLogoLabel->move(8, 20); + + QLabel* versionLabel = new QLabel(("Version " + Version::getApplicationVersion().toDisplayString()).c_str(), this); + versionLabel->move(210, 181); + + QLabel* developerTitle = new QLabel("Developed by:", this); + developerTitle->move(30, 220); + + QLabel* companyLabel = new QLabel( + "Coati Software OG\n" + "Schlossallee 7/1\n" + "5412 Puch bei Hallein\n" + "Austria\n" + "support@coati.io\n", + this + ); + companyLabel->move(210, 250); -void QtAbout::populateForm(QFormLayout* layout) -{ - QLabel* developerName = new QLabel("Developed by:"); - developerName->setAlignment(Qt::AlignTop); QLabel* developerLabel = new QLabel( "Manuel Dobusch\n" "Eberhard Gräther\n" "Malte Langkabel\n" - "Victoria Pfausler\n" - "Andreas Stallinger\n"); - developerLabel->setAlignment(Qt::AlignTop); - layout->addRow(developerName, developerLabel); + "Viktoria Pfausler\n" + "Andreas Stallinger\n", + this + ); + developerLabel->move(30, 250); - QLabel* acknowledgementsName = new QLabel("Acknowledgements:"); - acknowledgementsName->setAlignment(Qt::AlignTop); - QLabel* acknowledgementsLabel = new QLabel("Coati 0.1 was created in the context of education at the University of Applied Sciences Salzburg\n"); - acknowledgementsLabel->setWordWrap(true); - acknowledgementsLabel->setAlignment(Qt::AlignTop); - layout->addRow(acknowledgementsName, acknowledgementsLabel); + QLabel* acknowledgementsTitle = new QLabel("Acknowledgements:", this); + acknowledgementsTitle->setObjectName("small"); + acknowledgementsTitle->move(30, 355); - layout->addRow(QString("Version:"), new QLabel(Version::getApplicationVersion().toDisplayString().c_str())); + QLabel* acknowledgementsLabel = new QLabel( + "Coati 0.1 was created in the context of education at", + this + ); + acknowledgementsLabel->setObjectName("small"); + acknowledgementsLabel->move(30, 385); + + QtDeviceScaledPixmap fhsLogo("data/gui/about/logo_fhs.png"); + fhsLogo.scaleToWidth(150); + QLabel* fhsLabel = new QLabel(this); + fhsLabel->setPixmap(fhsLogo.pixmap()); + fhsLabel->resize(fhsLogo.width(), fhsLogo.height()); + fhsLabel->move(115, 410); + + QLabel* acknowledgementsLabel2 = new QLabel( + "Coati Software OG takes part in the Startup Salzburg\ninitiative.", + this + ); + acknowledgementsLabel2->setObjectName("small"); + acknowledgementsLabel2->move(30, 465); + + QPushButton* closeButton = new QPushButton("X", this); + closeButton->setObjectName("closeButton"); + closeButton->move(320, 20); + + connect(closeButton, SIGNAL(clicked()), this, SLOT(handleDoneButtonPress())); } void QtAbout::handleCancelButtonPress() diff --git a/src/app/qt/window/QtAbout.h b/src/app/qt/window/QtAbout.h index 2d17e8ee..0c024cb5 100644 --- a/src/app/qt/window/QtAbout.h +++ b/src/app/qt/window/QtAbout.h @@ -16,8 +16,6 @@ public: QSize sizeHint() const Q_DECL_OVERRIDE; virtual void setup() override; -protected: - virtual void populateForm(QFormLayout* layout) override; private slots: void handleCancelButtonPress();