tags:

views:

210

answers:

1

How to set gtk "Style Properties" listed in gtk documentation?
like for GtkWidget there are Style Properties:

  "separator-height"         gint                  : Read
  "separator-width"          gint                  : Read

So how to get and set them? using GTK+ and C.

Thanks, PP.

A: 

For example:

gint height, width;
gtk_widget_style_get(widget, "separator-height", &height, "separator-width", &width, NULL);

It works like g_object_get(). There is no corresponding gtk_widget_style_set() though, you have to set them through a RC file, which you load using gtk_rc_parse(). Here is the documentation on RC files.

Just to be clear though, users generally don't like it when you mess with their themes.

ptomato
Thanks... one more thing when we use bg_pixmap[NORMAL] = pixmap in rc file where do we keep that image. Is it a normal png,jpg image or it is other formats?
PP