开发者

How to set/get Gtk "Style Properties"

How to set g开发者_如何学JAVAtk "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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜