evolution r37138 - in trunk/calendar: . gui
- From: abharath svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r37138 - in trunk/calendar: . gui
- Date: Tue, 27 Jan 2009 06:42:24 +0000 (UTC)
Author: abharath
Date: Tue Jan 27 06:42:23 2009
New Revision: 37138
URL: http://svn.gnome.org/viewvc/evolution?rev=37138&view=rev
Log:
2009-01-27 Bharath Acharya <abharath novell com>
** Fix for bug #463597, bug #463594, bug#463599 (BNC) and
** bug #567824(BGO)
* gui/print.c (titled_box), (print_day_background),
(print_day_view), (print_week_view), (print_month_view): Fix all header
related bugs in calendar printing.
Bug reports:
1) Daily Printouts Display Hour In Wrong Spot :
When you print your daily calendar, it prints the hours in the left
column below the :30 time slot
2) Font Problems On Printout, Days Of Week
3) Calendar Heading Printout Problems, Overlapping Fonts
In print preview, short week day names in the header of the page are
overlapped.
Fixes all header issues mentioned at http://www.go-evolution.org/CalendarPrintoutLove
Modified:
trunk/calendar/ChangeLog
trunk/calendar/gui/print.c
Modified: trunk/calendar/gui/print.c
==============================================================================
--- trunk/calendar/gui/print.c (original)
+++ trunk/calendar/gui/print.c Tue Jan 27 06:42:23 2009
@@ -126,9 +126,9 @@
/* The width of the small calendar months, the space from the right edge of
the header rectangle, and the space between the months. */
-#define SMALL_MONTH_WIDTH 80
-#define SMALL_MONTH_PAD 4
-#define SMALL_MONTH_SPACING 12
+#define SMALL_MONTH_WIDTH 100
+#define SMALL_MONTH_PAD 5
+#define SMALL_MONTH_SPACING 20
/* The minimum number of rows we leave space for for the long events in the
day view. */
@@ -499,7 +499,7 @@
*x1 += 2;
*x2 -= 2;
*y2 += 2;
- print_text (context, font, text, alignment, *x1, *x2, *y1, *y1 + size * 1.4);
+ print_text (context, font, text, alignment, *x1, *x2, *y1 + 1.0, *y1 + size * 1.4);
*y1 += size * 1.4;
}
@@ -838,10 +838,10 @@
sprintf (buf, "%d", hour);
print_text (context, font_hour, buf, PANGO_ALIGN_RIGHT,
left, hour_minute_x,
- y - yinc + yinc / 2, y - yinc + yinc / 2 + hour_font_size);
+ y - yinc, y - yinc + hour_font_size);
print_text (context, font_minute, minute, PANGO_ALIGN_LEFT,
hour_minute_x, left + width - 3,
- y - yinc + yinc / 2, y - yinc + yinc / 2 + minute_font_size);
+ y - yinc, y - yinc + minute_font_size);
/* Draw the horizontal line between hours, across the entire
width of the day view. */
@@ -2086,7 +2086,7 @@
/* Print the filled border around the header. */
print_border (context, 0.0, width,
- 0.0, HEADER_HEIGHT + 2.0, 1.0, 0.9);
+ 0.0, HEADER_HEIGHT + 3.5, 1.0, 0.9);
/* Print the 2 mini calendar-months. */
l = width - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH * 2 - SMALL_MONTH_SPACING;
@@ -2171,14 +2171,14 @@
l = width - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH * 2
- SMALL_MONTH_SPACING;
print_month_small (context, gcal, when,
- l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 30,
+ l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 10,
DATE_MONTH | DATE_YEAR, when,
time_add_week_with_zone (when, 1, zone), FALSE);
l += SMALL_MONTH_SPACING + SMALL_MONTH_WIDTH;
print_month_small (context, gcal,
time_add_month_with_zone (when, 1, zone),
- l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 30,
+ l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 10,
DATE_MONTH | DATE_YEAR, when,
time_add_week_with_zone (when, 1, zone), FALSE);
@@ -2204,6 +2204,7 @@
icaltimezone *zone = calendar_config_get_icaltimezone ();
char buf[100];
gdouble width, height;
+ double l;
setup = gtk_print_context_get_page_setup (context);
@@ -2214,17 +2215,19 @@
print_month_summary (context, gcal, date, 0.0, width, HEADER_HEIGHT, height);
/* Print the border around the header. */
- print_border (context, 0.0, width, 0.0, HEADER_HEIGHT, 1.0, 0.9);
+ print_border (context, 0.0, width, 0.0, HEADER_HEIGHT + 10, 1.0, 0.9);
+
+ l = width - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH;
/* Print the 2 mini calendar-months. */
print_month_small (context, gcal,
time_add_month_with_zone (date, 1, zone),
- width - width / 7 + 2, 4,
- width - 8, HEADER_HEIGHT,
+ l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 4,
DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
+
print_month_small (context, gcal,
time_add_month_with_zone (date, -1, zone),
- 8, 4, width / 7 - 2, HEADER_HEIGHT,
+ 8, 4, width / 7 + 20, HEADER_HEIGHT + 4,
DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
/* Print the month, e.g. 'May 2001'. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]