From 67214d997166fa3ed2a0f5efec1b587dcb9f8675 Mon Sep 17 00:00:00 2001 From: crowning- Date: Wed, 20 Apr 2016 08:04:46 +0200 Subject: [PATCH] [UI] Parts of PR612 re-added --- src/Makefile.qt.include | 4 ++++ src/qt/dash.qrc | 4 ++++ src/qt/splashscreen.cpp | 9 ++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index b5cd0c94c6262..9b8c5292de5c1 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -421,6 +421,7 @@ endif RES_IMAGES = \ qt/res/images/drkblue/about.png \ qt/res/images/drkblue/splash.png \ + qt/res/images/drkblue/splash_testnet.png \ qt/res/images/drkblue/dash_logo_horizontal.png \ qt/res/images/drkblue/drkblue_downArrow.png \ qt/res/images/drkblue/drkblue_downArrow_small.png \ @@ -432,6 +433,7 @@ RES_IMAGES = \ qt/res/images/drkblue/drkblue_walletFrame.png \ qt/res/images/crownium/about.png \ qt/res/images/crownium/splash.png \ + qt/res/images/crownium/splash_testnet.png \ qt/res/images/crownium/dash_logo_horizontal.png \ qt/res/images/crownium/drkblue_downArrow.png \ qt/res/images/crownium/drkblue_downArrow_small.png \ @@ -443,6 +445,7 @@ RES_IMAGES = \ qt/res/images/crownium/drkblue_walletFrame.png \ qt/res/images/light/about.png \ qt/res/images/light/splash.png \ + qt/res/images/light/splash_testnet.png \ qt/res/images/light/dash_logo_horizontal.png \ qt/res/images/light/drkblue_downArrow.png \ qt/res/images/light/drkblue_downArrow_small.png \ @@ -454,6 +457,7 @@ RES_IMAGES = \ qt/res/images/light/drkblue_walletFrame.png \ qt/res/images/trad/about.png \ qt/res/images/trad/splash.png \ + qt/res/images/trad/splash_testnet.png \ qt/res/images/trad/dash_logo_horizontal.png \ qt/res/images/trad/drkblue_downArrow.png \ qt/res/images/trad/drkblue_downArrow_small.png \ diff --git a/src/qt/dash.qrc b/src/qt/dash.qrc index c3528d79677d6..8205e8365fb38 100644 --- a/src/qt/dash.qrc +++ b/src/qt/dash.qrc @@ -223,6 +223,7 @@ res/images/drkblue/drkblue_walletFrame_bg.png res/images/drkblue/drkblue_walletFrame.png res/images/drkblue/splash.png + res/images/drkblue/splash_testnet.png res/images/crownium/about.png @@ -236,6 +237,7 @@ res/images/crownium/drkblue_walletFrame_bg.png res/images/crownium/drkblue_walletFrame.png res/images/crownium/splash.png + res/images/crownium/splash_testnet.png res/images/light/about.png @@ -249,6 +251,7 @@ res/images/light/drkblue_walletFrame_bg.png res/images/light/drkblue_walletFrame.png res/images/light/splash.png + res/images/light/splash_testnet.png res/images/trad/about.png @@ -262,6 +265,7 @@ res/images/trad/drkblue_walletFrame_bg.png res/images/trad/drkblue_walletFrame.png res/images/trad/splash.png + res/images/trad/splash_testnet.png res/movies/spinner-000.png diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index b6ae73b0e343f..57feaa43f5cba 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -47,8 +47,15 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) QString font = QApplication::font().toString(); + // networkstyle.cpp can't (yet) read themes, so we do it here to get the correct Splash-screen + QString splashScreenPath = ":/images/" + GUIUtil::getThemeName() + "/splash"; + if(GetBoolArg("-regtest", false)) + splashScreenPath = ":/images/" + GUIUtil::getThemeName() + "/splash_testnet"; + if(GetBoolArg("-testnet", false)) + splashScreenPath = ":/images/" + GUIUtil::getThemeName() + "/splash_testnet"; + // load the bitmap for writing some text over it - pixmap = networkStyle->getSplashImage(); + pixmap = QPixmap(splashScreenPath); QPainter pixPaint(&pixmap); pixPaint.setPen(QColor(100,100,100));