After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 128346 - The calendar doesn't indicate current date
The calendar doesn't indicate current date
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkCalendar
3.22.x
Other All
: Normal enhancement
: Small feature
Assigned To: gtk-bugs
gtk-bugs
: 518124 518126 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-12-02 12:34 UTC by Tommi Komulainen
Modified: 2018-05-02 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The FIx (1.42 KB, patch)
2004-06-21 07:29 UTC, prasad
needs-work Details | Review
Facility to optionally draw a frame around the current date (4.23 KB, patch)
2012-09-21 21:26 UTC, Thorsten Schoel
none Details | Review

Description Tommi Komulainen 2003-12-02 12:34:54 UTC
There doesn't seem to be any indication in the calendar what the current
date is.  There should be something like the little red rectangle in
evolution calendar to highlight the current date.
Comment 1 Luis Villa 2004-01-02 22:35:00 UTC
Yeah, that would be nice. Maybe you can query for the folks working 
on evo<->clock applet integration, and suggest that they add it in 
their patches?
Comment 2 Vincent Untz 2004-01-06 21:55:55 UTC
I don't think the GTK calendar widget can handle this (it can not
handle two different set of marks, AFAIK).
Comment 3 Marc O'Morain 2004-02-20 16:09:15 UTC
Isn't this fixed now with the evolution integration?
Comment 4 Vincent Untz 2004-02-20 16:19:48 UTC
Marc: AFAIK, no.
Comment 5 prasad 2004-06-21 07:29:39 UTC
Created attachment 28896 [details] [review]
The FIx
Comment 6 Vincent Untz 2004-07-06 13:33:57 UTC
The patch is for GTK+.
Moving to GTK+ to see if GTK+ hackers are interested in such a feature.
Comment 7 Matthias Clasen 2004-07-06 16:55:14 UTC
Patch seems wrong, it simply fixes the initially selected day and always draws
that insensitive, like days outside the month. This 
a) isn't the right way to indicate the current date. Something else, eg the red
border would be better
b) the current day should only be highlighted in the current month, not in all
months
c) won't work if the app runs for more than a day, since the current_day is
never updated

Comment 8 Marc O'Morain 2004-07-06 17:20:18 UTC
I aggree that the red border is a good idea. But is hard-coding a colour (red) a
bad thing?

I have never looked at GTK themeing before, but on quick inspection I see that
there are some colours specified in a theme's gtkrc file:

    bg[NORMAL]      = "#ffffff"
    bg[PRELIGHT]    = "#ffffff"
    bg[ACTIVE]      = "#ffffff"
    bg[INSENSITIVE] = "#ffffff"
    bg[SELECTED]    = "#1376d3"
    base[NORMAL]    = "#ffffff"
    base[SELECTED]  = "#1376d3"
    base[ACTIVE]    = "#5e7ab7"
    text[SELECTED]  = "#ffffff"
    text[ACTIVE]    = "#ffffff"

Would it be better to use one of these colours rather than red to draw a border
around today?
Comment 9 Matthias Clasen 2004-07-06 17:27:49 UTC
The color should be determined by a style property, see how the icon view
handles its rubberbanding color. Also, there should be a regular boolean
property to turn this feature on, defaulting to FALSE.
Comment 10 dowem 2004-09-05 03:56:27 UTC
While looking through the list of usability booogs I stumbled onto this one. Is
anyone looking into this still, it would be nice to aim to fix it before the
2.10 release. 

Perhaps instead of simply coloring the sqaure for the current day, we could also
use some sort of visual shape queue?

We seem to only box it now with a color from the theme like so:
   1    2   3   [ 4 ] 
where the square is filled with a color. 

Perhaps could we do something like little arrows for the current day. 
   1    2   3    |> 4<|
where the arrows are filled with a color of distinction. 

I am inclined to think using some distinct shape for marking the current day in
conjunction with a distinctive color might help in case of users with issues
discerning colors. 
Comment 11 Marc O'Morain 2004-12-22 13:41:02 UTC
Matthias:

Why would you want to add the ability to turn this feature on or off? Indicating
the current date is a core feature of a calendar, and I cannot imagine why
anyone would not want this feature.
Comment 12 Matthias Clasen 2004-12-22 13:46:50 UTC
Because existing users of GtkCalendar might not want this new feature.
Comment 13 Marc O'Morain 2004-12-22 13:48:53 UTC
Ah, I understand now. I didn't realise that it was a shared componant.
Comment 14 Vincent Untz 2008-04-02 19:39:28 UTC
*** Bug 518124 has been marked as a duplicate of this bug. ***
Comment 15 Vincent Untz 2008-04-02 19:39:54 UTC
*** Bug 518126 has been marked as a duplicate of this bug. ***
Comment 16 Thorsten Schoel 2012-09-21 21:26:55 UTC
Created attachment 224960 [details] [review]
Facility to optionally draw a frame around the current date

This patch adds a "mark-today" property to GtkCalendar. If set, it will cause the calendar to draw a frame around the current date in the foreground color. This uses Cairo directly to do the painting.

Alternatively one could use gtk_render_frame but I am not entirely sure as to how I should approach the issue that way. Currently I have the impression that it would require adding a new class to gtk-default.css and to the GtkStyleContext.
Comment 17 GNOME Infrastructure Team 2018-05-02 13:54:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/230.