diff --git a/GUI/coregui/images/splashscreen.png b/GUI/coregui/images/splashscreen.png index aedec654fd407f1aed8f4b3d357932d8f2afc899..42d98baeaa1a2ed2a87c9cead6a5da1e391fae74 100644 Binary files a/GUI/coregui/images/splashscreen.png and b/GUI/coregui/images/splashscreen.png differ diff --git a/GUI/coregui/mainwindow/SplashScreen.cpp b/GUI/coregui/mainwindow/SplashScreen.cpp index c2283a06c9045f1291740d4aed843e2fb90511f1..bd41f84960cc880e74a458dcc2c870eec66ca237 100644 --- a/GUI/coregui/mainwindow/SplashScreen.cpp +++ b/GUI/coregui/mainwindow/SplashScreen.cpp @@ -14,16 +14,13 @@ #include "SplashScreen.h" #include "GUIHelpers.h" +#include "StyleUtils.h" #include <QCoreApplication> +#include <QDebug> #include <QElapsedTimer> #include <QStyle> #include <QTime> -namespace -{ -const int panel_height = 380; -} - SplashScreen::SplashScreen(QWidget* parent) : QSplashScreen(parent), m_percentage_done(0) { @@ -31,7 +28,7 @@ SplashScreen::SplashScreen(QWidget* parent) : QSplashScreen(parent), m_percentag this->setCursor(Qt::BusyCursor); QFont font; - font.setPointSize(10); + font.setPointSize(StyleUtils::SystemPointSize() * 0.9); font.setBold(false); this->setFont(font); } @@ -62,7 +59,11 @@ void SplashScreen::drawContents(QPainter* painter) { QSplashScreen::drawContents(painter); - QRect textRect(15.0, panel_height - 40, 100, 30); + auto img_rect = frameGeometry(); + auto char_height = StyleUtils::SizeOfLetterM().height(); + + QRect textRect(img_rect.width() * 0.02, img_rect.height() - char_height * 2.5, + img_rect.width() * 0.5, char_height * 3); QString versionText = QString("version ").append(GUIHelpers::getBornAgainVersionString()); style()->drawItemText(painter, textRect, 0, this->palette(), true, versionText); @@ -72,6 +73,7 @@ void SplashScreen::drawContents(QPainter* painter) loadingText.append(". "); } - QRect loadingRect(380.0, panel_height - 40, 100, 30); + QRect loadingRect(img_rect.width() * 0.8, img_rect.height() - char_height * 2.5, + img_rect.width(), char_height * 3); style()->drawItemText(painter, loadingRect, 0, this->palette(), true, loadingText); }