[GNC] Formatting the Register header?

Adrien Monteleone adrien.monteleone at lusfiber.net
Sun Jan 26 12:44:00 EST 2020


Thanks for sharing the file, and glad to see you were able to get themes working.

As noted previously in this thread, the way to find out what can be styled is to use the GTK Inspector. For MacOS you have to install GTK separately. I did so using Homebrew. You then have to start GnuCash with the Inspector via Terminal.app as noted in the GnuCash Wiki GTK page. There is a small learning curve, but once you figure out how to use it you can find out anything about a UI that you need for re-styling. This does not mean all elements can be styled. That is partly dependent on the code. But with the Inspector you can see how your styling change will look, or if it will even be effective at all.

For the case of the register header, if you want to do more than font or background color, you’d have to turn on the other styling hooks in the code and re-build the app yourself.

The same goes for icons.

Regards,
Adrien

> On Jan 25, 2020 w4d25, at 6:01 PM, farleykj <farleykj at gmail.com> wrote:
> 
> I tested the theme I wanted to use by copying all the GTK3 related files from
> the theme into the Gnucash config directory (~\Appplication
> Support\Gnucash\config\gtk-3.0 on MacOS). It worked fine, but as expressed
> elsewhere, the Register Header formatting was immune to all but the
> background color and font specifications.
> 
> I also realized that if you want to know what the proper syntax is to change
> elements of the interface, the best thing for me was to look in a place
> where someone has collected all the possible settings: a complete theme. If
> you look in those files, you find a lot widget specifications, with settings
> for horizontally aligned and vertically aligned elements (Like notebook
> tabs) that might not be apparent to someone who hasn't done any GTK3
> programming. Someone like me.
> 
> So, knowing how disappointing it can be to look for answers and find a
> discussion that doesn't have any final results, here's my current gtk3.css
> file. It's pretty much what I want, but as with all such things, once you
> start tweeking things around, you are always looking to make a few more
> changes. For example, I have a bunch of icons I built for the GTK2 based
> Gnucash interface that I'd like to use again. I just don't know how to swap
> them in, or if that's even possible.
> gtk.css <http://gnucash.1415818.n4.nabble.com/file/t375589/gtk.css>  
> 
> 
> 
> -----
> Ken Farley



More information about the gnucash-user mailing list