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 97376 - gtkcalendar arrow drawing
gtkcalendar arrow drawing
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkCalendar
2.1.x
Other Linux
: Normal normal
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-11-01 00:20 UTC by Owen Taylor
Modified: 2010-10-30 01:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.57 KB, patch)
2003-05-07 19:55 UTC, Matthias Clasen
committed Details | Review

Description Owen Taylor 2002-11-01 00:20:45 UTC
The arrows in GtkCalendar:

 - Aren't drawn with the theme, even though the reason
   for that (weird arrows with a relief) is gone in
   the GTK+-2.0 default theme.

 - Don't follow the state of the widget 
   (http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=69482)
Comment 1 Matthias Clasen 2003-05-06 22:13:17 UTC
There are also some redraw bugs in there: If I use testcalendar and
turn on "show headings" and "show day names", the arrows are drawn.
Now disable "show day names" again. This causes the calendar widget to
shrink. The month arrows are redrawn, the year arrows aren't and I
have to move the mouse over them to make them reappear.
Comment 2 Matthias Clasen 2003-05-07 19:55:14 UTC
Here is a patch which makes the arrows insensitive when the calendar
is insensitive and uses style functions for drawing the arrows.
Comment 3 Matthias Clasen 2003-05-07 19:55:54 UTC
Created attachment 16342 [details] [review]
patch
Comment 4 Owen Taylor 2003-07-18 19:57:09 UTC
Any time one touches GtkCalendar, it's hard to tell where
to stop fixing stuff... to get the arrow drawing right,
I think the code should:

 - Make the arrow windows input-only

 - use gtk_paint_flat_box() instead of setting and
   clearing the background of the arrow window

 - Instead of calling gtk_paint_arrow() directly
   in changes, have a gtk_invalidate_arrow() which
   invalidates that portion of the window. The goal
   for all of GTK+ these days is that all drawing
   in done out of process_updates()

That's sort of the minimum to get things to have
a chance of theming nicely.

I'd also comment that it doesn't look like:
 
 gtk_calendar_set_background()

is using the right colors for the arrow windows, but with
the above changes that doesn't matter.

Comment 5 Matthias Clasen 2003-12-21 23:43:04 UTC
I've committed the patch to get rid of draw_arrow_{left,right} in
favour of gtk_paint_arrow and to fix the appearance of the arrows in
an insensitive calendar. 

Leaving this open to track the more extensive drawing fixes proposed
by Owen.
Comment 6 Matthias Clasen 2010-10-30 01:58:13 UTC
This should all be fixed