Bitcoin Forum
April 30, 2024, 08:38:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to modify the look bitcoin GUI Client.  (Read 336 times)
chicodosbitcoin (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
April 11, 2018, 10:13:16 PM
 #1

I was playing in the file:
Code:
bitcoingui.cpp

but I still can't find where I could change the whole background of the GUI.


any ideas guys?
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714466291
Hero Member
*
Offline Offline

Posts: 1714466291

View Profile Personal Message (Offline)

Ignore
1714466291
Reply with quote  #2

1714466291
Report to moderator
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 13, 2018, 03:14:11 AM
Merited by achow101 (2), ABCbits (1)
 #2

As per the README here: https://github.com/bitcoin/bitcoin/tree/master/src/qt
forms

Contains Designer UI files. They are created with [Qt Creator](#use-qt-Creator-as IDE), but can be edited using any text editor.

The UI stuff for the forms is in the "forms" folder here: https://github.com/bitcoin/bitcoin/tree/master/src/qt/forms

Follow the "Designer UI" link for more info (http://doc.qt.io/qt-5.9/designer-using-a-ui-file.html)

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
MiningCoinsPool
Member
**
Offline Offline

Activity: 450
Merit: 10


View Profile
April 28, 2021, 08:44:33 PM
 #3

I was playing in the file:
Code:
bitcoingui.cpp

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 Offline

Activity: 1582
Merit: 6715


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 29, 2021, 09:01:09 AM
Merited by HCP (2), vapourminer (1)
 #4

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:

Code:
     <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 Offline

Activity: 450
Merit: 10


View Profile
April 30, 2021, 03:53:38 AM
 #5

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:

Code:
     <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 Offline

Activity: 1582
Merit: 6715


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 30, 2021, 10:54:39 AM
 #6

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 Offline

Activity: 450
Merit: 10


View Profile
May 01, 2021, 09:05:55 PM
 #7


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 Offline

Activity: 1582
Merit: 6715


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 02, 2021, 11:08:21 AM
 #8

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:

Code:
     <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 Offline

Activity: 450
Merit: 10


View Profile
May 02, 2021, 02:32:26 PM
 #9


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:

Code:
    // 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   Embarrassed  Embarrassed
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6715


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 02, 2021, 07:59:00 PM
 #10

~

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.ui

Where is has these lines at the very beginning:

Code:
<?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>
...

Code:
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 Offline

Activity: 450
Merit: 10


View Profile
May 03, 2021, 12:45:39 AM
 #11

~

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.ui

Where is has these lines at the very beginning:

Code:
<?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>
...

Code:
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 Offline

Activity: 1582
Merit: 6715


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 03, 2021, 09:14:02 AM
 #12

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 Offline

Activity: 450
Merit: 10


View Profile
May 06, 2021, 01:40:45 AM
 #13

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 Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!