Eclipse/SWT/GTK2 Driving Me Nuts

23 August 2005

GTK has been driving me nuts recently, since I've realized that I can't figure out how to change the font size of the GTK widgets. In particular, I can't shrink the size of the Tree widget that's used by Eclipse on SWT on GTK2.

Within Eclipse, I have all the fonts shrunken, so I can fit more on my mere XGA (1024x768) ThinkPad screen, but the trees and menus still insist on rendering at 12- or 14pt fonts.

I've poked around in gnome-font-properties, and I've even tried adding promising bits to my ~/.gtk* files, but nothing seems to actually affect the fonts.

Someday I'll stumble upon a way to do it, and until then, I'll have to fight the current distraction of not being able to do it.

Update (23 August 2005): Doug's Gnome 2.8 install on his Gentoo box applies the "Application Font" uniformly around menus, panels, trees, everything. My Debian Gnome 2.10 does not behave so admirably. The "Application Font" seems to be ignored by all GTK applications. Even a fresh user with fresh configurations exhibits the problem.

Further googling around with this new context still reveals nothing useful, so I guess I'll submit a bug with Debian.

Another Update: I've found the right lines to add to my .gtkrc-2.0:

style "user-font" {
    font_name = "Sans 10"
}
widget_class "*" style "user-font"

Now all my GTK apps have the smaller fonts.


Filed Under: Linux ThinkPad-R40 Java Computers