Re: Default fg_gc[GTK_STATE_SELECTED]



OK, 

so here is the problem I think:

focus rendering has no way of knowing whether it's being called from a
(text) widget whose "background" has been rendered using base_gc, or
a widget which has been rendered with "background" of bg_fg.

This means that whichever gc the focus draw routine chooses,
it must be legible against both base_gc and bg_gc.

Even changing paint_focus to take a gc (not something we can do now
anyway) would not work for treeview, since its focus drawing takes 
place independently of what the cell renderers do.

Ugh.  

I don't see a straightforward solution for 2.0 that's fully 
general, and what we have now is certainly better than the old
method of always using black_gc for focus lines (which makes
high-contrast themes or dark-background themes unimplementable).
Individual themes can work around this by being careful in 
choices of fg_gc relative to base_gc for GTK_STATE_SENSITIVE
and GTK_STATE_NORMAL. 

However the default theme's fg-on-base combo for GTK_STATE_SELECTED
leaves something to be desired in my opinion... but it's not
(IMO) totally fugly, the only case I've seen where focus is
actually hard to see as a result is for GtkCalendar when focussed
on the "selected" date.  A simple fix would be to override
fg_gc[GTK_STATE_SELECTED] for GtkCalendar only.

I propose that we either do that in a default gtkrc file, or
change the default color for fg_gc[GTK_STATE_SELECTED].

-Bill





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]