Merge pull request #761 from UdjinM6/fixStyling

Assign app name in NetworkStyle::NetworkStyle()
This commit is contained in:
Evan Duffield 2016-05-09 13:52:37 -07:00
commit bfaa5b6970
2 changed files with 4 additions and 1 deletions

View File

@ -655,7 +655,7 @@ int main(int argc, char *argv[])
QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(QString::fromStdString(Params().NetworkIDString()))); QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(QString::fromStdString(Params().NetworkIDString())));
assert(!networkStyle.isNull()); assert(!networkStyle.isNull());
// Allow for separate UI settings for testnets // Allow for separate UI settings for testnets
QApplication::setApplicationName(networkStyle->getAppName()); // QApplication::setApplicationName(networkStyle->getAppName()); // moved to NetworkStyle::NetworkStyle
// Re-initialize translations after changing application name (language in network-specific settings can be different) // Re-initialize translations after changing application name (language in network-specific settings can be different)
initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator); initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator);

View File

@ -62,6 +62,9 @@ NetworkStyle::NetworkStyle(const QString &appName, const int iconColorHueShift,
appName(appName), appName(appName),
titleAddText(qApp->translate("SplashScreen", titleAddText)) titleAddText(qApp->translate("SplashScreen", titleAddText))
{ {
// Allow for separate UI settings for testnets
QApplication::setApplicationName(appName);
// Grab theme from settings
QString theme = GUIUtil::getThemeName(); QString theme = GUIUtil::getThemeName();
// load pixmap // load pixmap
QPixmap appIconPixmap(":/icons/bitcoin"); QPixmap appIconPixmap(":/icons/bitcoin");