[goocanvas] 2011-08-17 Damon Chaplin <damon gnome org>
- From: Damon Chaplin <damon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvas] 2011-08-17 Damon Chaplin <damon gnome org>
- Date: Wed, 17 Aug 2011 15:58:19 +0000 (UTC)
commit 4ebbaff93e0789f675fabb42454bcb71dad608d4
Author: Damon Chaplin <damon gnome org>
Date: Wed Aug 17 16:58:44 2011 +0100
2011-08-17 Damon Chaplin <damon gnome org>
* src/goocanvastext.c (goo_canvas_text_get_requested_height): when
the height property is set make sure the bounds are still calculated.
Fixes redraw problems. (The way layout is done is too confusing.)
#656391
ChangeLog | 7 +++++++
src/goocanvastext.c | 13 +++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 825d340..6dbc360 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-17 Damon Chaplin <damon gnome org>
+
+ * src/goocanvastext.c (goo_canvas_text_get_requested_height): when
+ the height property is set make sure the bounds are still calculated.
+ Fixes redraw problems. (The way layout is done is too confusing.)
+ #656391
+
2011-08-11 Murray Cumming <murrayc.com>
GooCanvasTable: Warn if setting child properties on a non-child.
diff --git a/src/goocanvastext.c b/src/goocanvastext.c
index 7cb3c3b..496089b 100644
--- a/src/goocanvastext.c
+++ b/src/goocanvastext.c
@@ -773,19 +773,20 @@ goo_canvas_text_get_requested_height (GooCanvasItem *item,
if (simple_data->transform)
text->layout_width /= simple_data->transform->xx;
+ /* Create layout with given width. */
+ layout = goo_canvas_text_create_layout (simple_data, text->text_data,
+ text->layout_width, cr,
+ &simple->bounds, NULL, NULL);
+ g_object_unref (layout);
+
if (priv->height < 0.0)
{
- /* Create layout with given width. */
- layout = goo_canvas_text_create_layout (simple_data, text->text_data,
- text->layout_width, cr,
- &simple->bounds, NULL, NULL);
- g_object_unref (layout);
-
height = simple->bounds.y2 - simple->bounds.y1;
}
else
{
height = priv->height;
+ simple->bounds.y2 = simple->bounds.y1 + height;
}
/* Convert to the parent's coordinate space. As above, we only need to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]