-
Notifications
You must be signed in to change notification settings - Fork 326
Update about logo icon (colour) to denote the chain type of the QT instance in About/ Help Message Window/ Dialog #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty | |
| updateWindowTitle(); | ||
|
|
||
| rpcConsole = new RPCConsole(node, _platformStyle, nullptr); | ||
| helpMessageDialog = new HelpMessageDialog(this, false); | ||
| helpMessageDialog = new HelpMessageDialog(this, false, m_network_style); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try to be consistent about using named arguments here and below. e.g. either add for both helpMessageDialog = new HelpMessageDialog(/*parent=*/this, /*about=*/false, /*network_style=*/m_network_style);Or remove them (but i think adding is better). |
||
| #ifdef ENABLE_WALLET | ||
| if(enableWallet) | ||
| { | ||
|
|
@@ -936,7 +936,7 @@ void BitcoinGUI::aboutClicked() | |
| if(!clientModel) | ||
| return; | ||
|
|
||
| auto dlg = new HelpMessageDialog(this, /*about=*/true); | ||
| auto dlg = new HelpMessageDialog(this, /*about=*/true, m_network_style); | ||
| GUIUtil::ShowModalDialogAsynchronously(dlg); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,8 @@ | |
|
|
||
| #include <qt/guiutil.h> | ||
|
|
||
| #include <qt/networkstyle.h> | ||
|
|
||
| #include <clientversion.h> | ||
| #include <common/args.h> | ||
| #include <init.h> | ||
|
|
@@ -27,7 +29,7 @@ | |
| #include <QVBoxLayout> | ||
|
|
||
| /** "Help message" or "About" dialog box */ | ||
| HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) : | ||
| HelpMessageDialog::HelpMessageDialog(QWidget* parent, bool about, const NetworkStyle* networkStyle) : | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use |
||
| QDialog(parent, GUIUtil::dialog_flags), | ||
| ui(new Ui::HelpMessageDialog) | ||
| { | ||
|
|
@@ -37,8 +39,8 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) : | |
|
|
||
| if (about) | ||
| { | ||
| setWindowTitle(tr("About %1").arg(CLIENT_NAME)); | ||
|
|
||
| this->setAboutWindowTitle(networkStyle); | ||
| this->setChainTypeIconOnAboutLogo(networkStyle); | ||
| std::string licenseInfo = LicenseInfo(); | ||
| /// HTML-format the license message from the core | ||
| QString licenseInfoHTML = QString::fromStdString(LicenseInfo()); | ||
|
|
@@ -137,6 +139,21 @@ void HelpMessageDialog::on_okButton_accepted() | |
| close(); | ||
| } | ||
|
|
||
| void HelpMessageDialog::setAboutWindowTitle(const NetworkStyle* networkStyle) | ||
| { | ||
| QString aboutTitle = tr("About %1").arg(CLIENT_NAME); | ||
| if (networkStyle && Params().GetChainType() != ChainType::MAIN) { | ||
| aboutTitle.append(" " + networkStyle->getTitleAddText()); | ||
| } | ||
| setWindowTitle(aboutTitle); | ||
| } | ||
|
|
||
| void HelpMessageDialog::setChainTypeIconOnAboutLogo(const NetworkStyle* networkStyle) | ||
| { | ||
| const QSize requiredSize(1024, 1024); | ||
| if (networkStyle) ui->aboutLogo->setPixmap(networkStyle->getAppIcon().pixmap(requiredSize)); | ||
| } | ||
|
|
||
|
|
||
| /** "Shutdown" window */ | ||
| ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to skip this for
main? It should always work to get the right color scheme, right?