2008-07-02 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1010 - ClutterLabel does not update the layout (Lee Jusung) * clutter/clutter-actor.c: (clutter_actor_queue_relayout): Remove some pointer dereferencing. * clutter/clutter-label.c: (clutter_label_allocate): Revert the change of r2883 and remove the layout width cache and force a recreation of the layout every time we receive an allocation.
This commit is contained in:
parent
cfd91cd0ef
commit
12fd095006
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2008-07-02 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
Bug 1010 - ClutterLabel does not update the layout (Lee Jusung)
|
||||
|
||||
* clutter/clutter-actor.c:
|
||||
(clutter_actor_queue_relayout): Remove some pointer dereferencing.
|
||||
|
||||
* clutter/clutter-label.c:
|
||||
(clutter_label_allocate): Revert the change of r2883 and remove the
|
||||
layout width cache and force a recreation of the layout every time
|
||||
we receive an allocation.
|
||||
|
||||
2008-07-01 Neil Roberts <neil@o-hand.com>
|
||||
|
||||
* clutter/clutter-actor.c (clutter_actor_get_transformed_sizeu):
|
||||
|
@ -3042,17 +3042,17 @@ clutter_actor_queue_relayout (ClutterActor *self)
|
||||
priv->needs_allocation)
|
||||
return; /* save some cpu cycles */
|
||||
|
||||
self->priv->needs_width_request = TRUE;
|
||||
self->priv->needs_height_request = TRUE;
|
||||
self->priv->needs_allocation = TRUE;
|
||||
priv->needs_width_request = TRUE;
|
||||
priv->needs_height_request = TRUE;
|
||||
priv->needs_allocation = TRUE;
|
||||
|
||||
/* always repaint also */
|
||||
if (CLUTTER_ACTOR_IS_VISIBLE (self))
|
||||
clutter_actor_queue_redraw (self);
|
||||
|
||||
/* We need to go all the way up the hierarchy */
|
||||
if (self->priv->parent_actor)
|
||||
clutter_actor_queue_relayout (self->priv->parent_actor);
|
||||
if (priv->parent_actor)
|
||||
clutter_actor_queue_relayout (priv->parent_actor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,8 +93,6 @@ struct _ClutterLabelPrivate
|
||||
PangoAttrList *attrs;
|
||||
PangoAttrList *effective_attrs;
|
||||
PangoLayout *layout;
|
||||
|
||||
ClutterUnit layout_width;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -289,19 +287,15 @@ clutter_label_allocate (ClutterActor *self,
|
||||
ClutterLabelPrivate *priv = label->priv;
|
||||
ClutterActorClass *parent_class;
|
||||
|
||||
if (priv->layout_width != (box->x2 - box->x1))
|
||||
/* the allocation was changed, so we must recreate the layout */
|
||||
if (priv->layout)
|
||||
{
|
||||
/* the allocation was changed, so we must recreate the layout */
|
||||
if (priv->layout)
|
||||
{
|
||||
g_object_unref (priv->layout);
|
||||
priv->layout = NULL;
|
||||
}
|
||||
|
||||
priv->layout = clutter_label_create_layout (label, box->x2 - box->x1);
|
||||
priv->layout_width = box->x2 - box->x1;
|
||||
g_object_unref (priv->layout);
|
||||
priv->layout = NULL;
|
||||
}
|
||||
|
||||
priv->layout = clutter_label_create_layout (label, box->x2 - box->x1);
|
||||
|
||||
parent_class = CLUTTER_ACTOR_CLASS (clutter_label_parent_class);
|
||||
parent_class->allocate (self, box, origin_changed);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user