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:
>
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.GtkB
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),
>>>
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 \
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.
___
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...
_
#include
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, 0);
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),
>>>
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