|
12 | 12 |
|
13 | 13 | #include <qt/guiutil.h> |
14 | 14 |
|
| 15 | +#include <qt/networkstyle.h> |
| 16 | + |
15 | 17 | #include <clientversion.h> |
16 | 18 | #include <common/args.h> |
17 | 19 | #include <init.h> |
|
29 | 31 | #include <QVBoxLayout> |
30 | 32 |
|
31 | 33 | /** "Help message" or "About" dialog box */ |
32 | | -HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) : |
33 | | - QDialog(parent, GUIUtil::dialog_flags), |
34 | | - ui(new Ui::HelpMessageDialog) |
| 34 | +HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about, const NetworkStyle* networkStyle) : QDialog(parent, GUIUtil::dialog_flags), |
| 35 | + ui(new Ui::HelpMessageDialog) |
35 | 36 | { |
36 | 37 | ui->setupUi(this); |
37 | 38 |
|
38 | 39 | QString version = QString{PACKAGE_NAME} + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()); |
39 | 40 |
|
40 | 41 | if (about) |
41 | 42 | { |
42 | | - setWindowTitle(tr("About %1").arg(PACKAGE_NAME)); |
43 | | - |
| 43 | + this->setAboutWindowTitle(networkStyle); |
| 44 | + this->setChainTypeIconOnAboutLogo(networkStyle); |
44 | 45 | std::string licenseInfo = LicenseInfo(); |
45 | 46 | /// HTML-format the license message from the core |
46 | 47 | QString licenseInfoHTML = QString::fromStdString(LicenseInfo()); |
@@ -135,6 +136,19 @@ void HelpMessageDialog::on_okButton_accepted() |
135 | 136 | close(); |
136 | 137 | } |
137 | 138 |
|
| 139 | +void HelpMessageDialog::setAboutWindowTitle(const NetworkStyle* networkStyle) |
| 140 | +{ |
| 141 | + QString aboutTitle = tr("About %1").arg(PACKAGE_NAME); |
| 142 | + if ((networkStyle) && (Params().GetChainType() != ChainType::MAIN)) aboutTitle.append(" " + networkStyle->getTitleAddText()); |
| 143 | + setWindowTitle(aboutTitle); |
| 144 | +} |
| 145 | + |
| 146 | +void HelpMessageDialog::setChainTypeIconOnAboutLogo(const NetworkStyle* networkStyle) |
| 147 | +{ |
| 148 | + const QSize requiredSize(1024, 1024); |
| 149 | + if (networkStyle) ui->aboutLogo->setPixmap(networkStyle->getAppIcon().pixmap(requiredSize)); |
| 150 | +} |
| 151 | + |
138 | 152 |
|
139 | 153 | /** "Shutdown" window */ |
140 | 154 | ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f): |
|
0 commit comments