Re: Default fg_gc[GTK_STATE_SELECTED]
- From: Owen Taylor <otaylor redhat com>
- To: Bill Haneman <bill haneman sun com>
- Cc: Havoc Pennington <hp redhat com>, gtk-devel-list gnome org
- Subject: Re: Default fg_gc[GTK_STATE_SELECTED]
- Date: Fri, 25 Jan 2002 14:28:44 -0500 (EST)
Bill Haneman <bill haneman sun com> writes:
> Owen Taylor wrote:
> >
> > Bill Haneman <bill haneman sun com> writes:
> >
> > > Havoc Pennington wrote:
> > > >
> > > > Bill Haneman <bill haneman sun com> writes:
> > > > >
> > > > > Does anyone know why this gc is white by default in GTK+ ?
> > > >
> > > > This gc should be used for selectable label text, when the label is
> > > > selected.
> > >
> > > Hmm, OK, but that means selected labels are quite hard to read,
> > > why not use text_gc instead ?
> >
> > You always use either:;
> >
> > text[STATE] on base[STATE]
> >
> > or:
> >
> > fg[STATE] on bg[STATE]
> >
> > Never mixed. For some reason, we used to always use:
> >
> > fg[SELECTED] on bg[SELECTED]
> >
> > even when drawing text that would normally be:
> >
> > text[NORMAL] on base[NORMAL]
> >
> > The new canonical thing is that we use:
> >
> > text[SELECTED] on base[SELECTED]
> >
> > At the same time we did this, we switched the color scheme for
> > text[SELECTED] on base[SELECTED] to be dark-on-light instead of
> > light-on-dark, but fg[SELECTED] on bg[SELECTED] is still the old
> > white-on-blue. (I think this is just a temporary condition, though
> > it makes it easy to spot the CLists since they have the old color
> > scheme.)
> >
> > If things aren't legible, you are mixing fg/base or text/bg.
>
> OK, the problem is not text legibility, it's focus line legibility.
>
> We use fg on bg, which for SELECTED is not really easy to see.
fg[SELECTED] on bg[SELECTED is perfectly fine.
I think you are running into the problem that
fg[SELECTED] does not contrast with base[NORMAL]
This is a problem you are going to have with any "inverted selection"
color scheme if you draw the focus line in the same color as the
selected text.
> Note the GtkCalendar does some weird stuff here, mixing
> (it seems) text and bg, different states, willy-nilly when
> rendering the dates. Maybe that's a bug...
There is very little that is _right_ about rendering GtkCalender.
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]