Applying style changes to a widget
- From: "Craig Harding" <craigwharding gmail com>
- To: gtk-list gnome org
- Subject: Applying style changes to a widget
- Date: Thu, 6 Mar 2008 00:55:32 -0330
Hi, I'm running the following code to decrease the vertical space
between nodes in a GtkTreeView.
GString *style = g_string_new("");
g_string_append(style, "style \"blist-vspace-style\" {\n");
g_string_append(style, "GtkTreeView::vertical-separator=0\n");
g_string_append(style, "\n} widget \"*pidgin_blist_treeview\" style
\"blist-vspace-style\"");
which creates a gtkrc-type style for my widget. I am then running the
following code to immediately set the style (above) to the widget.
gtk_rc_parse_string(style->str);
GtkSettings *setting = NULL;
setting = gtk_settings_get_default();
gtk_rc_reset_styles(setting);
My question is.. Is there another way to apply the style changes
online (immedaitely) to a widget without using the GtkSettings method
above?
Thanks,
Craig.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]