@@ -21,12 +21,13 @@ static const struct {
2121 const char *appName;
2222 const int iconColorHueShift;
2323 const int iconColorSaturationReduction;
24+ const char *macIconPath;
2425 const std::string titleAddText;
2526} network_styles[] = {
26- {" main" , QAPP_APP_NAME_DEFAULT, 0 , 0 , " " },
27- {" test" , QAPP_APP_NAME_TESTNET, 190 , 20 , " " },
28- {" devnet" , QAPP_APP_NAME_DEVNET, 35 , 15 , " [devnet: %s]" },
29- {" regtest" , QAPP_APP_NAME_REGTEST, 160 , 30 , " " }
27+ {" main" , QAPP_APP_NAME_DEFAULT, 0 , 0 , " :/icons/dash_macos_mainnet " , " " },
28+ {" test" , QAPP_APP_NAME_TESTNET, 190 , 20 , " :/icons/dash_macos_testnet " , " " },
29+ {" devnet" , QAPP_APP_NAME_DEVNET, 35 , 15 , " :/icons/dash_macos_devnet " , " [devnet: %s]" },
30+ {" regtest" , QAPP_APP_NAME_REGTEST, 160 , 30 , " :/icons/dash_macos_regtest " , " " },
3031};
3132
3233void NetworkStyle::rotateColor (QColor& col, const int iconColorHueShift, const int iconColorSaturationReduction)
@@ -62,7 +63,8 @@ void NetworkStyle::rotateColors(QImage& img, const int iconColorHueShift, const
6263}
6364
6465// titleAddText needs to be const char* for tr()
65- NetworkStyle::NetworkStyle (const QString &_appName, const int iconColorHueShift, const int iconColorSaturationReduction, const char *_titleAddText):
66+ NetworkStyle::NetworkStyle (const QString &_appName, const int iconColorHueShift, const int iconColorSaturationReduction,
67+ const char *_macIconPath, const char *_titleAddText, const std::string &networkId):
6668 appName(_appName),
6769 titleAddText(qApp->translate (" SplashScreen" , _titleAddText)),
6870 badgeColor(QColor(0 , 141 , 228 )) // default badge color is the original Dash's blue, regardless of the current theme
@@ -86,6 +88,12 @@ NetworkStyle::NetworkStyle(const QString &_appName, const int iconColorHueShift,
8688 appIcon = QIcon (appIconPixmap);
8789 trayAndWindowIcon = QIcon (appIconPixmap.scaled (QSize (256 ,256 )));
8890 splashImage = QPixmap (" :/images/splash" );
91+
92+ #ifdef Q_OS_MACOS
93+ if (_macIconPath) {
94+ m_macos_icon = QIcon (QPixmap (_macIconPath));
95+ }
96+ #endif // Q_OS_MACOS
8997}
9098
9199const NetworkStyle* NetworkStyle::instantiate (const std::string& networkId)
@@ -107,7 +115,9 @@ const NetworkStyle* NetworkStyle::instantiate(const std::string& networkId)
107115 appName.c_str (),
108116 network_style.iconColorHueShift ,
109117 network_style.iconColorSaturationReduction ,
110- titleAddText.c_str ());
118+ network_style.macIconPath ,
119+ titleAddText.c_str (),
120+ networkId);
111121 }
112122 }
113123 return nullptr ;
0 commit comments