conform/text-cache: Use the stage paint signal
The stage's paint signal is guaranteed to be emitted; ClutterText's paint signal is not.
This commit is contained in:
parent
e54ee64380
commit
485b720a54
@ -28,7 +28,7 @@ struct _CallbackData
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_paint (ClutterActor *label, CallbackData *data)
|
on_paint (ClutterActor *stage, CallbackData *data)
|
||||||
{
|
{
|
||||||
PangoLayout *new_layout;
|
PangoLayout *new_layout;
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ text_cache (void)
|
|||||||
|
|
||||||
data.test_layout = make_layout_like_label (CLUTTER_TEXT (data.label));
|
data.test_layout = make_layout_like_label (CLUTTER_TEXT (data.label));
|
||||||
|
|
||||||
g_signal_connect (data.label, "paint", G_CALLBACK (on_paint), &data);
|
g_signal_connect (data.stage, "paint", G_CALLBACK (on_paint), &data);
|
||||||
|
|
||||||
clutter_container_add (CLUTTER_CONTAINER (data.stage), data.label, NULL);
|
clutter_container_add (CLUTTER_CONTAINER (data.stage), data.label, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user