GTK+ suggestion

Don’t you think that this looks sweet? The statusbar/toolbar font is -2 points smaller than the default font size (minimum size is 8pt). We filed a bug report on GTK+ over a year ago about this but no one seems to care, even if it makes the windows look so much better (applications like Baobab that now comes in Gnome 2.18+ by default would greatly benefit from it because it has a lot of toolbar text). So far in my Gnome desktop I had to disable the toolbar text completely, but with these changes I would leave it on. BeOS and Mac OS X’s toolbar font is also smaller than the rest of the fonts and it’s details like these that make these UIs look “cleaner”. The devil is in the details.

Please note that the above fonts are too small, as this is my personal setup, not how they would normally be in a default installation. Check the screenshot linked above to see how it would look by default should this feature gets implemented.

14 Comments »

felipe wrote on March 16th, 2007 at 1:57 AM PST:

I think it’s pretty cool, a link to the #bug?


This is the admin speaking...
Eugenia wrote on March 16th, 2007 at 2:02 AM PST:

Here is the bug itself, and here is how you can get by until this is implemented by default on GTK. Edit your ~/.gtkrc-2.0 file and add:

style “toolbar”
{ font_name = “Sans 8″ }
style “statusbar”
{ font_name = “Sans 8″ }
widget_class “*Toolbar*” style “toolbar”
widget_class “*Statusbar*” style “statusbar”

(make a search/replace to replace the smart quotes to double quotes before you copy/paste it on your gtkrc file)


felipe wrote on March 16th, 2007 at 2:10 AM PST:

Eugenia,

Luca Ferretti suggests this instead:

style "smaller-text" {
font_name = "8"
}
widget_class "*Toolbar*" style "smaller-text"
widget_class "*Statusbar*" style "smaller-text"

It’s better because it doesn’t force the font family (although Sans is usually just an alias). Do you know of a way to force smaller text on tab too? That would complete the picture ;)


felipe wrote on March 16th, 2007 at 3:05 AM PST:

thank you :)


felipe wrote on March 17th, 2007 at 2:20 AM PST:

Thank you for the answers. The following:

widget_class "*Notebook.GtkLabel" style "smaller-text"

as suggested by Eugenia does the job on most apps (eg. configlets) but not on Epiphany, Gedit, and I suspect others. I’m running some tests to find out the exact name of those widgets.

If you want, here’s a pic of what I’d like to be affected by smaller-text:

http://img89.imageshack.us/img89/9194/smallertextxq8.png

although i reckon it’s pretty much impossible to generalize


blag wrote on March 17th, 2007 at 2:38 AM PST:

I really liked the first screenshot you had with the smallest fonts. It really does make quite a difference.


Kitty wrote on March 17th, 2007 at 7:20 AM PST:

I think for tabs text you could add something like:

widget_class “*Notebook*” style “smaller-text”


Kitty wrote on March 17th, 2007 at 7:21 AM PST:

Oops, sorry, I forgot to tag that as code :)


This is the admin speaking...
Eugenia wrote on March 17th, 2007 at 8:45 AM PST:

You actually need this:
widget_class “*Notebook.GtkLabel” style “smaller-text”
However this won’t work with tabs, e.g. Gedit.


Kitty wrote on March 17th, 2007 at 9:26 AM PST:

Just noticed a few side effects: “*Notebook*” works with gedit’s tabs, but it also matches other (unwanted) stuff, e.g. bluefish’s sidebar tree…
It’s been a while since I manipulated my gtkrc files, so I’ll try and find some correct documentation instead of pulling classes names out of thin air.


Kitty wrote on March 17th, 2007 at 9:55 AM PST:

After some trials
widget_class "*Notebook.*Label" style "smaller-text"
seems to cover my cases well.
I suppose they subclassed gtklabel in those cases not matched by *Notebook.GtkLabel?


This is the admin speaking...
Eugenia wrote on March 17th, 2007 at 10:04 AM PST:

This still does not work for me well, because it makes all fonts inside a notebook to be smaller-text too, not just the labels. For example, the “removable drives and media”.


atla wrote on March 20th, 2007 at 11:25 AM PST:

Yep, actually quite a nice idea i have to admit.

It is a kind of usability having bigger toolbar fields(icon&text) but looks too big by default. I switched text off on all toolbars because they were just too huge.
This does indeed look very nice. I would turn them back on the day it would be available to have it that size.

*thumbs up*

atla


Thomas wrote on March 23rd, 2007 at 1:42 AM PST:

Is there, to your knowledge, a way to turn text labels off entirely via gtkrc?


Comments are closed as this blog post is now archived.

Lines, paragraphs break automatically. HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

The URI to TrackBack this blog entry is this. And here is the RSS 2.0 for comments on this post.