GtkStyle question.
- From: Alex Buoy <alex buoy eiffel com>
- To: "gtk-list redhat com" <gtk-list redhat com>
- Subject: GtkStyle question.
- Date: Fri, 17 Sep 1999 10:52:00 -0700
Hi,
In my program, I am playing with foreground colors and background
colors.
To set them, I do as the following:
/* 1- copy the style of the widget */
widgetStyle = gtk_style_copy(GTK_WIDGET(widget)->style);
/* 2- change the value of the GtkStyle to the value I want */
widgetStyle->bg [i].red = 25700;
...
/* 3- Set the new style to the widget */
gtk_widget_set_style (widget, widgetStyle);
It works, however sometimes, I have a problem with the colors set.
Indeed, When I get the value set, I do not have
25700 as expected but 26214 !!??!!.
So I tried to see where my GtkStyle was modified and saw that it was in
the function
"gtk_style_attach", when "gtk_style_init" is called.
But I don't really understand why a new GtkStyle is created and that it
is not my GtkStyle which is used by the widget.
If anyone could help me,
Alex.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]