Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-09 Thread Bastiaan Veelo
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),

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-09 Thread Bastiaan Veelo
Bastiaan Veelo wrote: 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: So I faked the parent widget through some evil hacking in the expose function below. It

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Kristian Rietveld
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,

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
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),

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
I looked at modules/engines/ms-windows/msw_style.c, line 855, and tried the following, without succes: gchar* class_path = NULL; gtk_widget_class_path(button, NULL, class_path, NULL); gchar buf[1024]; g_snprintf (buf, sizeof(buf), widget_class \%s\ style

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
Hi, I have done some more experimenting with styles, attached, and my confusion has only grown bigger. See comments in the source. I still cannot get an ordinary button to look like a tree view title... Should I go ask on gtk-devel? Regards, Bastiaan.

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
One more try with attachments. Bastiaan Veelo wrote: I have done some more experimenting with styles, attached, and my confusion has only grown bigger. See comments in the source. I still cannot get an ordinary button to look like a tree view title...

Re: How to make a button look like a treeview column title? [Was: How to use the treeview column title style for a button?]

2007-10-08 Thread Bastiaan Veelo
#include gtk/gtk.h int main( int argc, char *argv[] ) { gtk_init (argc, argv); GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (window, destroy, G_CALLBACK (gtk_widget_destroyed), window); GtkWidget *vbox = gtk_vbox_new (FALSE,