Re: GtkCalendar weekend in different color



Detlef Reichl <detlef reichl arcormail de> writes:

> hi
> 
> i made a patch for the GtkCalendar, so that the days of the weekend are
> shown in a different color. to control if the claendar shall use it i
> added to GtkCalendarDisplayOptions a GTK_CALENDAR_WEEKEND_EMPHASIE flag.
> for now i'he hardcoded the color of the weekend days to red, caus from
> the default style allmost all colors are allready in use for the
> calendar. is it ok in this way, shall there be an accessor function to
> change the color and shall the default be to have it turned on or off?

The right way to handle special widget colors is generally to
do them as style properties. GtkEntry::cursor_color provides
an example of this. Usually having a program set something like
this makes no sense, since it doesn't know what color the
background is going to be, so it shouldn't be in the API.

As for whether we should have this feature, and whether the default
should be on or off, I have very little opinion, which probably
makes it a GTK+-2.2. feature.

The only usage like this I can think of is that in some business
apps I've seen the weekend days _deemphasized_ (in gray) because
they aren't business days. Emphasizing the weekend seems a little
odd to me, though I guess if you were writing a vacation planner :-)

Regards,
                                        Owen




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