Skip to content
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

Update about logo icon (colour) to denote the chain type of the QT instance in About/ Help Message Window/ Dialog #762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
Stale ACK BrandonOdiwuor

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

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

src/qt/utilitydialog.cpp Outdated Show resolved Hide resolved
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
Copy link
Contributor Author

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?

I'm less sure about black-toned icons, in that specific case, it's more common usage I guess, users are already used to the orange one.

I think the most notable use case is when you have different instances open and you want to make sure you are standing on the correct one but more importantly the consistency regarding other components such as the splash screen and task-bar icons as pointed by @GBKS.

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino February 28, 2024 00:23
@hebasto
Copy link
Member

hebasto commented May 15, 2024

#762 (comment):

Definitely more consistent this way.

Thank you @GBKS for your designer's opinion!

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

If you will touch this branch, mind applying clang-format-diff.py?

src/qt/utilitydialog.h Outdated Show resolved Hide resolved
@pablomartin4btc
Copy link
Contributor Author

Updates:

  • Addressed @hebasto's feedback.
    git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
    Formatting src/qt/bitcoingui.cpp
    Formatting src/qt/utilitydialog.cpp
    Formatting src/qt/utilitydialog.h
    
    

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

Tested 577d500.

On Windows, there remains some inconsistency. Running bitcoin-qt.exe -signet -about ends with a dialog with an orange-coloured icon.

src/qt/utilitydialog.cpp Outdated Show resolved Hide resolved
src/qt/utilitydialog.cpp Outdated Show resolved Hide resolved
@pablomartin4btc
Copy link
Contributor Author

On Windows, there remains some inconsistency. Running bitcoin-qt.exe -signet -about ends with a dialog with an orange-coloured icon.

Let me take a look...

@pablomartin4btc
Copy link
Contributor Author

On Windows, there remains some inconsistency. Running bitcoin-qt.exe -signet -about ends with a dialog with an orange-coloured icon.

Let me take a look...

image

Good catch... trying to get it sorted...

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.

Also, set th correct chain type icon at the very beginning of
GuiMain() where command line arguments were validated and most of
the app settings were not initialised yet.
@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

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
9 participants