Re: foreground of widget->style->fg_gc[state] != widget->style->fg[state]
- From: Owen Taylor <otaylor redhat com>
- To: Vlad Harchev <hvv hippo ru>
- Cc: gtk-devel-list gnome org
- Subject: Re: foreground of widget->style->fg_gc[state] != widget->style->fg[state]
- Date: 21 Oct 2001 16:07:16 -0400
Vlad Harchev <hvv hippo ru> writes:
> Hello,
>
> Today I discovered that foreground of some gc in widget->style (e.g
> widget->style->fg_gc[GTK_STATE_NORMAL] is default foreground X assigns to GC
> (black)). Why not set foreground to widget->style->fg[GTK_STATE_NORMAL] in
> that case?
> This fixes a lot of stupid gtk-theme-unfriendliness bugs in a lot of software
> (just fixed ones in GAL).
>
> What do you think about this?
Can you explain more? Is this GTK+-1.2 or GTK+-1.3?
widget->style->fg_gc[state] is _defined_ to be a graphics context
with it's fg set to widget->style->fg[state]. If that wasn't
the case then things wouldn't work one bit.
The code getting fg_gc is:
gc_values.foreground = style->fg[i];
style->fg_gc[i] = gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
So, unless GtkGC is broken or someone is
a) modifying fg[] after the style is realized
b) modfying fg_gc[] after the style is realized
I can't see how the problem would occur.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]