squentin / gmusicbrowser

jukebox for large collections of music
http://gmusicbrowser.org
GNU General Public License v3.0
194 stars 42 forks source link

How to change font? #216

Closed MountainX closed 2 years ago

MountainX commented 2 years ago

Hello. This is my first time using GMusicBrowser. It's very impressive!

I need to change the font and font size used in the GUI. How is that accomplished?

It would also be nice to change some colors. Is that possible?

squentin commented 2 years ago

Though it is possible, it's not very easy.

from http://gmusicbrowser.org/faq.html :

How can I customize the appearance of gmusicbrowser ? You can create a custom layout (see the documentation and some contributed layouts). You can also use a gtk theme different from the rest of your system by launching gmusicbrowser like that :GTK2_RC_FILES=REPLACEME/gtk-2.0/gtkrc gmusicbrowser, where REPLACEME is the path to the theme. (system-wide theme are usually in /usr/share/themes/, user installed theme in ~/.themes/).

1- through gtk2 theme See https://wiki.gmusicbrowser.org/customization/themes, it's a bit outdated and gtk2-only, but it has a simple example to change the font colors, you can add the line font_name="Sans 20" to make it change the font and font size.

2- though gtk3 theme (for current beta) Of course as gtk3 has a whole news theme system, the gtk2 method won't work but the same result should be achievable, I'll try to update that wiki page.

3- through gmb layouts You can take your favorite gmb layouts, put it in a new file in ~/.config/gmusicbrowser/layouts/newname.layout and add lines like:

DefaultFontColor= white
DefaultFont = Sans 20

I don't think there is anything to change the default background color.

Maybe I'll add some gui to change some things like that.

MountainX commented 2 years ago

Thank you for your reply! I am using version 1.1.99.1 (gtk3 beta).

Though it is possible, it's not very easy.

Your third option seems pretty easy. Is it really this simple? Just copy the layout file and set these 2 values?

DefaultFontColor= white
DefaultFont = Sans 20

My only question now is when I copy the original layouts to ~/.config/gmusicbrowser/layouts, if I keep the original name, will my new file "override" the original?

If I just copy a layout, change the two lines shown above and keep the original layout name, that seems simple. Is that a good approach?

squentin commented 2 years ago

My only question now is when I copy the original layouts to ~/.config/gmusicbrowser/layouts, if I keep the original name, will my new file "override" the original?

It should, yes, or you can just rename it. You can also use a derived layout:

[newname] based on originalname
Name = "The name used in the GUI"
DefaultFontColor= white
DefaultFont = Sans 20

I added a starting point for using gtk3 themes in https://wiki.gmusicbrowser.org/customization/themes

MountainX commented 2 years ago

I added a starting point for using gtk3 themes in https://wiki.gmusicbrowser.org/customization/themes

Thank you! The more I learn about GMB, the more I like it! Very impressive piece of work. Thanks for keeping it current with gtk3.