mirror of
https://github.com/brl/mutter.git
synced 2025-02-17 05:44:08 +00:00
text: Update get_paint_volume() implementation
In commit 9818eee4646e49e99beb5a43f1dafcbdcca41f94 I forgot to update ClutterText as well as the other actors.
This commit is contained in:
parent
16f7ee13f2
commit
5640a65046
@ -1921,28 +1921,12 @@ clutter_text_paint (ClutterActor *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
clutter_text_get_paint_volume (ClutterActor *self,
|
clutter_text_get_paint_volume (ClutterActor *self,
|
||||||
ClutterPaintVolume *volume)
|
ClutterPaintVolume *volume)
|
||||||
{
|
{
|
||||||
ClutterGeometry allocation;
|
return _clutter_actor_set_default_paint_volume (self,
|
||||||
|
CLUTTER_TYPE_TEXT,
|
||||||
/* XXX: we are being conservative here and not making assumptions
|
volume);
|
||||||
* that sub-classes won't paint outside their allocation. */
|
|
||||||
if (G_OBJECT_TYPE (self) != CLUTTER_TYPE_TEXT)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* XXX: clutter_actor_get_allocation can potentially be very
|
|
||||||
* expensive to call if called while the actor doesn't have a valid
|
|
||||||
* allocation since it will trigger a synchronous relayout of the
|
|
||||||
* scenegraph. We explicitly check we have a valid allocation
|
|
||||||
* to avoid hitting that codepath. */
|
|
||||||
if (!clutter_actor_has_allocation (self))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
clutter_actor_get_allocation_geometry (self, &allocation);
|
|
||||||
clutter_paint_volume_set_width (volume, allocation.width);
|
|
||||||
clutter_paint_volume_set_height (volume, allocation.height);
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user