Kristian Rietveld wrote:
Hi, On Sun, Oct 07, 2007 at 12:35:01PM +0200, Bastiaan Veelo wrote:I am a style newbie. I want some of the buttons in my widget to look like the column title buttons in a treeview. How do I do that?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);
Thank you for replying. However, for me the above has no visible effect. Now I understand that a GtkStyle is just about colors and similar settings, which only partly determine the looks of a widget. In my case I suspect that a GtkTreeView.GtkButton has the same GtkStyle settings as ordinary buttons, which is why I see no change.
What I want is that a button of my choice is rendered exactly like the title button in a treeview. I rephrased the subject accordingly.
I recently discovered that there is something called a theme engine, and 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.
Thanks, Bastiaan.