aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/ChangeLog7
-rw-r--r--widgets/text/e-text.c10
2 files changed, 12 insertions, 5 deletions
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;