Re: foreground of widget->style->fg_gc[state] != widget->style->fg[state]
- From: Vlad Harchev <hvv hippo ru>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: foreground of widget->style->fg_gc[state] != widget->style->fg[state]
- Date: Mon, 22 Oct 2001 01:22:32 +0500 (SAMST)
On 21 Oct 2001, Owen Taylor wrote:
Hello, Owen!
>
> 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?
gtk-1.2
> 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
OK, it seems b) is happening (I don't have proof that b) is really happening
- just a theory, and your reply make me thinking more and more that this is
not gtk fault).
I'm sorry for drawing this offending conclusion without verifying facts
properly.
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]