Post
Topic
Board Development & Technical Discussion
Re: How to modify the look bitcoin GUI Client.
by
NotATether
on 02/05/2021, 19:59:00 UTC
~

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.