aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-05 19:56:37 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-05 19:56:37 +0800
commit1ddccec355a202867c860bcda611aec0a6051f7b (patch)
tree274765795203c214b41c7e7d5588f77e7a2fedb6
parente335802981396bacf6d20a2168853d94ba15df9c (diff)
downloadgsoc2013-evolution-1ddccec355a202867c860bcda611aec0a6051f7b.tar
gsoc2013-evolution-1ddccec355a202867c860bcda611aec0a6051f7b.tar.gz
gsoc2013-evolution-1ddccec355a202867c860bcda611aec0a6051f7b.tar.bz2
gsoc2013-evolution-1ddccec355a202867c860bcda611aec0a6051f7b.tar.lz
gsoc2013-evolution-1ddccec355a202867c860bcda611aec0a6051f7b.tar.xz
gsoc2013-evolution-1ddccec355a202867c860bcda611aec0a6051f7b.tar.zst
gsoc2013-evolution-1ddccec355a202867c860bcda611aec0a6051f7b.zip
** Fix for bug #341085
2007-11-05 Milan Crha <mcrha@redhat.com> ** Fix for bug #341085 * calendar/gui/e-day-view.c: (e_day_view_reshape_day_event): Use 'x_offset' instead of changing event size when has icons. * widgets/text/e-text.c: (get_bounds), (e_text_draw): Use 'x_offset' and 'y_offset' only for text drawing, not for changing bounds of EText. svn path=/trunk/; revision=34504
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-day-view.c4
-rw-r--r--widgets/ChangeLog7
-rw-r--r--widgets/text/e-text.c10
4 files changed, 21 insertions, 7 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 5776c846cc..9adc332c60 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,12 @@
2007-11-05 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #341085
+
+ * gui/e-day-view.c: (e_day_view_reshape_day_event):
+ Use 'x_offset' instead of changing event size when has icons.
+
+2007-11-05 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #359267
* gui/gnome-cal.c: (update_memo_view):
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 9422378d44..0eccaa3922 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -5867,6 +5867,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
/* We don't show the icons while resizing, since we'd have to
draw them on top of the resize rect. */
+ icons_offset = 0;
num_icons = 0;
if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
|| day_view->resize_event_day != day
@@ -5896,8 +5897,6 @@ e_day_view_reshape_day_event (EDayView *day_view,
icons_offset = E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD * 2;
else
icons_offset = (E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD) * num_icons + E_DAY_VIEW_ICON_X_PAD;
- item_x += icons_offset;
- item_w -= icons_offset;
}
if (!event->canvas_item) {
@@ -5934,6 +5933,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
gnome_canvas_item_set (event->canvas_item,
"clip_width", (gdouble) item_w,
"clip_height", (gdouble) item_h,
+ "x_offset", (gdouble) icons_offset,
NULL);
e_canvas_item_move_absolute(event->canvas_item,
item_x, item_y);
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 37ff812cfc..19c993c5c4 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-05 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #341085
+
+ * text/e-text.c: (get_bounds), (e_text_draw): Use 'x_offset' and
+ 'y_offset' only for text drawing, not for changing bounds of EText.
+
2007-10-26 Kjartan Maraas <kmaraas@gnome.org>
* e-timezone-dialog/e-timezone-dialog.c: (get_local_offset),
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index d76c608801..6941314dfa 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -507,7 +507,7 @@ get_bounds (EText *text, double *px1, double *py1, double *px2, double *py2)
wx = 0;
wy = 0;
gnome_canvas_item_i2w (item, &wx, &wy);
- gnome_canvas_w2c (item->canvas, wx + text->xofs, wy + text->yofs, &text->cx, &text->cy);
+ gnome_canvas_w2c (item->canvas, wx, wy, &text->cx, &text->cy);
gnome_canvas_w2c (item->canvas, wx, wy, &text->clip_cx, &text->clip_cy);
if (text->clip_width < 0)
@@ -1524,15 +1524,15 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
xpos = text->text_cx;
ypos = text->text_cy;
- xpos -= x;
- ypos -= y;
+ xpos = xpos - x + text->xofs;
+ ypos = ypos - y + text->yofs;
clip_rect = NULL;
if (text->clip) {
rect.x = xpos;
rect.y = ypos;
- rect.width = text->clip_cwidth;
- rect.height = text->clip_cheight;
+ rect.width = text->clip_cwidth - text->xofs;
+ rect.height = text->clip_cheight - text->yofs;
gdk_gc_set_clip_rectangle (main_gc, &rect);
clip_rect = &rect;