Kristian Rietveld wrote: > On Mon, Oct 08, 2007 at 03:53:29PM +0200, Bastiaan Veelo wrote: > >>> Something like this seems to work for me: >>> >>> button = gtk_button_new_with_label ("..."); >>> style = gtk_rc_get_style_by_paths (gtk_widget_get_settings (button), >>> "*.GtkTreeView.GtkButton", >>> NULL, >>> G_OBJECT_TYPE (button)); >>> gtk_widget_set_style (button, style); >>> <snip> >> I guess I need to trick the theme engine into thinking that it is >> drawing a GtkTreeView button. Is there a way to do that? If the method >> would be engine-dependent, I need it to work on MS Windows. >> > > That is exactly what the code above tries to achieve. <snip>
The reason why this is not going to work (for the windows theme at least, GTK+ 2.10) is a hard-coded check on the type of widget->parent in draw_box() on line 1929 of msw_style.c: if (GTK_IS_TREE_VIEW (widget->parent) || GTK_IS_CLIST (widget->parent)) { if (xp_theme_draw (window, XP_THEME_ELEMENT_LIST_HEADER, style, x, y, width, height, state_type, area)) return; _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list