[text] Do not use markup on an editable Text
An editable ClutterText should not use pango_layout_set_markup(), as the contents of the text actor will not match the text. Only read-only text actors should parse the contents for Pango markup.
This commit is contained in:
parent
368df450b2
commit
c1c7131199
@ -262,7 +262,9 @@ clutter_text_create_layout_no_cache (ClutterText *text,
|
|||||||
|
|
||||||
if (priv->text)
|
if (priv->text)
|
||||||
{
|
{
|
||||||
if (!priv->use_markup)
|
if (priv->use_markup && !priv->editable)
|
||||||
|
pango_layout_set_markup (layout, priv->text, -1);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (G_LIKELY (priv->password_char == 0))
|
if (G_LIKELY (priv->password_char == 0))
|
||||||
pango_layout_set_text (layout, priv->text, priv->n_bytes);
|
pango_layout_set_text (layout, priv->text, priv->n_bytes);
|
||||||
@ -290,8 +292,6 @@ clutter_text_create_layout_no_cache (ClutterText *text,
|
|||||||
g_string_free (str, TRUE);
|
g_string_free (str, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
pango_layout_set_markup (layout, priv->text, -1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allocation_width > 0 &&
|
if (allocation_width > 0 &&
|
||||||
@ -3145,6 +3145,9 @@ clutter_text_get_alignment (ClutterText *self)
|
|||||||
* Sets whether the contents of the #ClutterText actor contains markup
|
* Sets whether the contents of the #ClutterText actor contains markup
|
||||||
* in <link linkend="PangoMarkupFormat">Pango's text markup language</link>.
|
* in <link linkend="PangoMarkupFormat">Pango's text markup language</link>.
|
||||||
*
|
*
|
||||||
|
* Calling this function on an editable #ClutterText will not cause
|
||||||
|
* the actor to parse any markup.
|
||||||
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user