- change global setWindowIcon() calls to qApp->setWindowIcon() as all parent windows will then use this set icon
GUI: allow easier use of the testnet icon #1259
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:GUI_testnet_UX changing 1 files +2 −0-
Diapolo commented at 10:36 AM on May 11, 2012: none
-
laanwj commented at 10:47 AM on May 11, 2012: member
Please don't add non-model arguments to setModel calls.
Sorry, but I don't think this is important enough to change the interface or introduce extra complexity at all.
-
laanwj commented at 10:53 AM on May 11, 2012: member
I also wonder why this doesn't go right by default. Shouldn't it inherit the parent window icon? Or how does this work?
-
Diapolo commented at 10:53 AM on May 11, 2012: none
LOL, this can be done just like with the about-Qt dialog ... I don't even need to pass something new ;), so you are right.
-
Diapolo commented at 10:56 AM on May 11, 2012: none
Updated to an easy fix, but I don't know, why they don't use the testnet icon as default. At lest now every GUI element uses it, while we are on testnet :).
Edit: The Main-Window window icon is changed to testnet in BitcoinGUI::setClientModel(), perhaps the following dialogs still use what was default at compile-time?
-
laanwj commented at 11:01 AM on May 11, 2012: member
Yeah, I wonder where it gets the 'non-testnet' icon from at all? If new dialogs can somehow still find it, that means it is still stored somewhere, which is not right. We need to figure this out, so all the explicit setWindowIcons can go.
-
laanwj commented at 11:03 AM on May 11, 2012: member
maybe qApp->setWindowIcon ?
-
Diapolo commented at 11:15 AM on May 11, 2012: none
Can qApp be freely used in bitcoingui.cpp? I'll try this.
-
Diapolo commented at 11:19 AM on May 11, 2012: none
Alright this fixes it! Will update this pull.
-
Diapolo commented at 11:25 AM on May 11, 2012: none
Updated!
-
laanwj commented at 11:33 AM on May 11, 2012: member
You still need to set the window icon of the current window as well... It will only change the default for new dialogs/windows.
-
Diapolo commented at 11:38 AM on May 11, 2012: none
That is strange, as this works like it should. If I use normal net, the icon is correct on every dialog, the same for testnet.
As we call setClientModel() on Init, the icon set should be a global one, what am I understanding wrong here?
-
laanwj commented at 12:11 PM on May 11, 2012: member
Ok, maybe this just works then.
-
laanwj commented at 1:26 PM on May 11, 2012: member
On Ubuntu, this causes no dock icon to be shown at all anymore (either in testnet or normal net). You do need to set the setWindowIcon on the BitcoinGUI instance as well, in both places where you set it in qApp. The qApp icon is only applied automatically to windows constructed after it is set. The BitcoinGUI instance already exists at that time.
-
Diapolo commented at 1:28 PM on May 11, 2012: none
So just re-add setWindowIcon(QIcon(":icons/bitcoin")); below the qApp-> lines?
-
laanwj commented at 1:28 PM on May 11, 2012: member
Yes
-
add calls to qApp->setWindowIcon(), to remove the need to set window icons for testnet with additional calls 37244c2f7f
-
Diapolo commented at 1:32 PM on May 11, 2012: none
Done and this work on Ubuntu now, too so that you have testnet-symbol on every dialog while on testnet?
-
laanwj commented at 1:35 PM on May 11, 2012: member
Yep it works great with this. However, ubuntu doesn't show a symbol for every window, just for the application, so I can't check the second part. I assume it is OK though everywhere now.
- laanwj referenced this in commit 23f59e7023 on May 11, 2012
- laanwj merged this on May 11, 2012
- laanwj closed this on May 11, 2012
- coblee referenced this in commit 8d42a42b4a on Jul 17, 2012
- suprnurd referenced this in commit 9114ef7930 on Dec 5, 2017
- lateminer referenced this in commit cf1bab30d5 on May 6, 2020
- lateminer referenced this in commit 16d7dac5f7 on May 6, 2020
- DrahtBot locked this on Sep 8, 2021