chicodosbitcoin (OP)
Newbie
Offline
Activity: 9
Merit: 0
|
|
April 11, 2018, 10:13:16 PM |
|
I was playing in the file: but I still can't find where I could change the whole background of the GUI. any ideas guys?
|
|
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
MiningCoinsPool
Member
Offline
Activity: 450
Merit: 10
|
|
April 28, 2021, 08:44:33 PM |
|
I was playing in the file: but I still can't find where I could change the whole background of the GUI. any ideas guys? Hi, have you find out for changing the whole background? I'd like to make a white background instead of basic system default one (grey ugly for Windows)
|
|
|
|
NotATether
Legendary
Offline
Activity: 1582
Merit: 6715
bitcoincleanup.com / bitmixlist.org
|
Hi, have you find out for changing the whole background? I'd like to make a white background instead of basic system default one (grey ugly for Windows)
For the main window (and this only changes the main window) you open the overviewpage.ui file in the src/qt/forms folder in a text editor and right below the line <widget class="QWidget" ... line at the top, add the following lines: <property name="styleSheet"> <string notr="true">QWindow { background-color: color:#FFFFFF; }</string> </property> The color is in hex notation so in this case the background will be white. Repeat this process for all the other dialogs whose background you want to change by editing their respective files in that folder.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
MiningCoinsPool
Member
Offline
Activity: 450
Merit: 10
|
|
April 30, 2021, 03:53:38 AM |
|
Hi, have you find out for changing the whole background? I'd like to make a white background instead of basic system default one (grey ugly for Windows)
For the main window (and this only changes the main window) you open the overviewpage.ui file in the src/qt/forms folder in a text editor and right below the line <widget class="QWidget" ... line at the top, add the following lines: <property name="styleSheet"> <string notr="true">QWindow { background-color: color:#FFFFFF; }</string> </property> The color is in hex notation so in this case the background will be white. Repeat this process for all the other dialogs whose background you want to change by editing their respective files in that folder. Hey, thank ive found out already, i use Qt Creator it 's much easier! Unfortunately the .ui files from /qt/forms folder don't include the possibility of modifying the header menus. I keep looking for! Thank you for responding btw
|
|
|
|
NotATether
Legendary
Offline
Activity: 1582
Merit: 6715
bitcoincleanup.com / bitmixlist.org
|
|
April 30, 2021, 10:54:39 AM |
|
Hey, thank ive found out already, i use Qt Creator it 's much easier!
Unfortunately the .ui files from /qt/forms folder don't include the possibility of modifying the header menus.
I keep looking for!
Thank you for responding btw
If you are talking about the menu bar widget that looks like this: Then you can skin that by replacing the style sheet with QMenuBar ... instead of QWindow.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
MiningCoinsPool
Member
Offline
Activity: 450
Merit: 10
|
|
May 01, 2021, 09:05:55 PM |
|
Then you can skin that by replacing the style sheet with QMenuBar ... instead of QWindow.
Hi Oh okkk, i didn't quite understand sorry. What is QMenuBar? Is this a part of Qt Creator or something? And which file would it be to be modified, in the bitcoin source code for example? Thanks
|
|
|
|
NotATether
Legendary
Offline
Activity: 1582
Merit: 6715
bitcoincleanup.com / bitmixlist.org
|
|
May 02, 2021, 11:08:21 AM |
|
What is QMenuBar? Is this a part of Qt Creator or something? And which file would it be to be modified, in the bitcoin source code for example?
QMenuBar is the Qt widget that draws the long menu strips at the top of the screen (see above image). You place a line like this in the same file, right between the <property> tag like this: <property name="styleSheet"> <string notr="true">QMenuBar { background-color: color:#FFFFFF; }</string> <string notr="true">QWindow { background-color: color:#FFFFFF; }</string> </property> QMenuBar class documentation for anyone interested in reading
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
MiningCoinsPool
Member
Offline
Activity: 450
Merit: 10
|
|
May 02, 2021, 02:32:26 PM |
|
QMenuBar is the Qt widget that draws the long menu strips at the top of the screen (see above image).
You place a line like this in the same file, right between the <property> tag like this:
Hi, thank you! What i meant also is, what file exactly? Like you said " you place a line in the same file " But, which file? That's the thing, there is no .ui file for the menu bar. It is only mentioned in the bitcoingui.cpp, it explains in which order are placed the functions: // Configure the menus QMenu *file = appMenuBar->addMenu(tr("&File")); if(walletFrame) { file->addAction(openAction); file->addAction(backupWalletAction); file->addAction(signMessageAction); file->addAction(verifyMessageAction); file->addSeparator(); file->addAction(usedSendingAddressesAction); file->addAction(usedReceivingAddressesAction); file->addSeparator(); } But the bitcoingui.cpp cannot contains any <property> functions which works only with XML code like in the .ui files
|
|
|
|
NotATether
Legendary
Offline
Activity: 1582
Merit: 6715
bitcoincleanup.com / bitmixlist.org
|
|
May 02, 2021, 07:59:00 PM |
|
~
Hi, thank you! What i meant also is, what file exactly? Like you said " you place a line in the same file " But, which file? That's the thing, there is no .ui file for the menu bar. It is only mentioned in the bitcoingui.cpp, it explains in which order are placed the functions: You're actually not supposed to put it in the C++ file. You're supposed to place it in here https://github.com/bitcoin/bitcoin/blob/master/src/qt/forms/overviewpage.uiWhere is has these lines at the very beginning: <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>OverviewPage</class> <widget class="QWidget" name="OverviewPage"> <-- insert code block below this line <property name="geometry"> <rect> <x>0</x> <y>0</y> ... insert below lines --v <property name="styleSheet"> <string notr="true">QMenuBar { background-color: color:#FFFFFF; }</string> <string notr="true">QWindow { background-color: color:#FFFFFF; }</string> </property>
The way UI files are composed, is that they represent whole windows and dialog boxes (the kind that your window manager can minimize and maximize) So this includes the body of a window, the status bar, all the buttons and radios and input boxes inside the entire window, and so on. This means all these parts can be styled just for that window in the respective UI file. The c++ files are just for connecting functions that run on button presses and displaying text.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
MiningCoinsPool
Member
Offline
Activity: 450
Merit: 10
|
|
May 03, 2021, 12:45:39 AM |
|
~
Hi, thank you! What i meant also is, what file exactly? Like you said " you place a line in the same file " But, which file? That's the thing, there is no .ui file for the menu bar. It is only mentioned in the bitcoingui.cpp, it explains in which order are placed the functions: You're actually not supposed to put it in the C++ file. You're supposed to place it in here https://github.com/bitcoin/bitcoin/blob/master/src/qt/forms/overviewpage.uiWhere is has these lines at the very beginning: <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>OverviewPage</class> <widget class="QWidget" name="OverviewPage"> <-- insert code block below this line <property name="geometry"> <rect> <x>0</x> <y>0</y> ... insert below lines --v <property name="styleSheet"> <string notr="true">QMenuBar { background-color: color:#FFFFFF; }</string> <string notr="true">QWindow { background-color: color:#FFFFFF; }</string> </property>
The way UI files are composed, is that they represent whole windows and dialog boxes (the kind that your window manager can minimize and maximize) So this includes the body of a window, the status bar, all the buttons and radios and input boxes inside the entire window, and so on. This means all these parts can be styled just for that window in the respective UI file. The c++ files are just for connecting functions that run on button presses and displaying text. Hi! And thanks again for your reply AAAaaah ok i see! Just by mentioning "QMenuBar " in the styleSheet function is enough for the code to know it will be the modifications going to the menubar directly? This is awesome lol, ok i'll test it right away thanks man!
|
|
|
|
NotATether
Legendary
Offline
Activity: 1582
Merit: 6715
bitcoincleanup.com / bitmixlist.org
|
|
May 03, 2021, 09:14:02 AM |
|
Just by mentioning "QMenuBar " in the styleSheet function is enough for the code to know it will be the modifications going to the menubar directly?
Yes.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
MiningCoinsPool
Member
Offline
Activity: 450
Merit: 10
|
|
May 06, 2021, 01:40:45 AM |
|
Just by mentioning "QMenuBar " in the styleSheet function is enough for the code to know it will be the modifications going to the menubar directly?
Yes. Hi okk, sadly it didn't work, I keep looking for a solution, i'll share here everything i'll find
|
|
|
|
|