Re: GtkEntry font in rc file



All I want to do is change the font of a named GtkEntry widget in a resource file. It used to work in gtk1.2. I have spent hours with various combinations of "widget *.name.*" etc. to no avail. Does anyone know how to do this in gtk2 ?

You didn't describe exactly what you did. What name has the widget?
An example:


style "default"
{
    font_name = "Arial 12"
}

style "mystyle"
{
    font_name = "Arial Black 24"
}

# catch all, if needed
widget_class "*" style "default"

# style for specific widget
widget "MyWindow.*MyEntry" style "mystyle"


Note that in GTK2 the font is specified with "font_name" and not
with "font". Also note that we no longer have to use a X11 font
description but an libfontconfig name (which is much more natural).


Cheers,
Andy



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]