Skip to content

Conversation

@pablomartin4btc
Copy link
Contributor

@pablomartin4btc pablomartin4btc commented Sep 25, 2023

It fixes #761.

About logo icon is updated now with the correct colour indicating the chain type of the QT instance that user is running (as the splash screen), plus the title of the about window also is updated with the chain type string as in the main window.

Before PR changes screenshot

image

After PR changes screenshot

image

Current splash screen screenshot (this hasn't been touched, just to show consistency with this PR changes)

image

Tested it also with:

  • mainnet (no command line args after bitcoin-qt or bitcoin-qt -chain=main),
  • -regtest and
  • -testnet.

@DrahtBot
Copy link
Contributor

DrahtBot commented Sep 25, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK hernanmarino, laanwj
Stale ACK BrandonOdiwuor

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

No conflicts as of last run.

LLM Linter (✨ experimental)

Possible typos and grammar issues:

  • "Create a message box, because the gui has neither been created nor has subscribed to core signals" -> "Create a message box, because the gui has neither been created nor has it subscribed to core signals." [Missing pronoun "it" makes the second clause ungrammatical; adding "it" fixes the subject for "has subscribed."]

No other typographic or grammatical errors affecting comprehension were found.

2025-12-03

Copy link
Contributor

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may help to show screenshots before and after

void HelpMessageDialog::setAboutWindowTitle(const NetworkStyle *networkStyle)
{
QString aboutTitle = tr("About %1").arg(PACKAGE_NAME);
if ((networkStyle) && (Params().GetChainType() != ChainType::MAIN)) aboutTitle.append(" " + networkStyle->getTitleAddText());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this be nullptr? Seems easier to use a reference that is never null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to touch src/qt/bitcoin.cpp:

HelpMessageDialog help(nullptr, gArgs.IsArgSet("-version"));

And I also needed to move where the networkStyle is initialised/ set before the HelpMessageDialog constructor:

QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(Params().GetChainType()));

But I can do it if that's better.

@pablomartin4btc
Copy link
Contributor Author

It may help to show screenshots before and after

Thanks for your review @MarcoFalke, the before screenshot is on the issue #761 but I can bring it here if that makes it clearer.

Copy link
Contributor

@hernanmarino hernanmarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested ACK

@pablomartin4btc
Copy link
Contributor Author

It may help to show screenshots before and after

@maflcko I've updated the description with your suggestion (copied @furszy's style from his PR #764, I find it less invasive for the reviewer)

Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tack 30c235b

Copy link
Contributor

@BrandonOdiwuor BrandonOdiwuor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

Copy link
Contributor

@BrandonOdiwuor BrandonOdiwuor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK 30c235b

Screenshot from 2023-12-28 16-34-43

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino December 28, 2023 13:38
@hebasto
Copy link
Member

hebasto commented Feb 12, 2024

@GBKS What do you think from a designer's point of view?

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino February 12, 2024 14:00
@maflcko
Copy link
Contributor

maflcko commented Feb 12, 2024

Not sure. All info displayed on the About page is fixed details about the software itself, not about the current (test)chain. So modulating the icon or title bar seems confusing, but no strong opinion.

@GBKS
Copy link

GBKS commented Feb 15, 2024

Definitely more consistent this way.

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino February 15, 2024 12:30
@hebasto
Copy link
Member

hebasto commented Feb 15, 2024

Not sure. All info displayed on the About page is fixed details about the software itself, not about the current (test)chain.

In that case, shouldn't the logo on the About page be black-toned?

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino February 15, 2024 13:22
@pablomartin4btc pablomartin4btc force-pushed the gui-update-about-logo-icon branch from 577d500 to 5556860 Compare August 25, 2024 19:02
@pablomartin4btc
Copy link
Contributor Author

Updates:

Now running qt from the command line with bitcoin-qt.exe -signet -about (or similar command with an invalid argument) will show the correct chain type icon at the top left of the title bar (this is only happening in Windows at the moment).

image

@pablomartin4btc
Copy link
Contributor Author

Rebased.

@achow101 achow101 requested review from davidgumberg and laanwj and removed request for hernanmarino October 22, 2025 14:32
@laanwj
Copy link
Member

laanwj commented Oct 23, 2025

Concept ACK

@pablomartin4btc pablomartin4btc force-pushed the gui-update-about-logo-icon branch 2 times, most recently from f189e8b to 6287b64 Compare December 3, 2025 01:42
@pablomartin4btc pablomartin4btc force-pushed the gui-update-about-logo-icon branch 4 times, most recently from 4612c5f to 5648658 Compare December 3, 2025 04:29
@DrahtBot DrahtBot removed the CI failed label Dec 3, 2025
Adding the networkStyle parameter to the HelpMessageDialog
creator on utilitydialog, updating all calls where its instance
is being created from bitcoingui.cpp. In the object itself,
use this new parameter object to build the about window title and
set the icon of the about logo widget.
Introducing a new helper GUIUtil::ShowMessageBox() in order to
incorporate the chaintype image in the message box window icon.
@pablomartin4btc pablomartin4btc force-pushed the gui-update-about-logo-icon branch from 5648658 to da44744 Compare December 3, 2025 13:43
@pablomartin4btc
Copy link
Contributor Author

Updates:

  • Addressed @laanwj's feedback.

  • Reworked the error message window inconsistency fix detected by @hebasto above, applying it to most QMessageBox possible instances in bitcoin.cpp and separating it in the 2nd commit for clarity and in case it needs to be dropped because it's getting out of scope or extended to other files (perhaps a follow-up in a separate PR).

    Message-box window icon behavior is inconsistent across platforms: some X11 window managers and many Wayland compositors ignore message-box icons entirely. With the new GUIUtil::ShowMessageBox() helper, we can instead explicitly set QIcon() (no icon) and avoid constructing a NetworkStyle just for dialogs or checking whether a ChainType was passed.
    (Windows behavior still needs to be re-checked under Qt 6 — to confirm whether the no-icon option is effectively applied.)
    --- a/src/qt/guiutil.cpp
    +++ b/src/qt/guiutil.cpp
    @@ -1012,7 +1012,6 @@ void ShowModalDialogAsynchronously(QDialog* dialog)
     
     void ShowMessageBox(const QString& message,
                                 QMessageBox::Icon box_icon,
    -                            const NetworkStyle* network_style,
                                 const QString& title)
     {
         QString qTitle = CLIENT_NAME;
    @@ -1021,14 +1020,7 @@ void ShowMessageBox(const QString& message,
     
         mBox.setTextFormat(Qt::PlainText);
    
    -    if (network_style) {
    -        mBox.setWindowIcon(network_style->getTrayAndWindowIcon());
    -    } else if (!gArgs.GetChainTypeString().empty()) {
    -        std::unique_ptr<const NetworkStyle> fallback(NetworkStyle::instantiate(gArgs.GetChainType()));
    -        if (fallback) {
    -            mBox.setWindowIcon(fallback->getTrayAndWindowIcon());
    -        }
    -    }
    +    mBox.setWindowIcon(QIcon());
    
         mBox.exec();
     }
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

About logo icon doesn't denote chain type (?) in About/ Help message window/ dialog

10 participants