pango_layout_set_alignment (layout, priv->alignment);
pango_layout_set_single_paragraph_mode (layout, priv->single_line_mode);
pango_layout_set_justify (layout, priv->justify);
+ pango_layout_set_wrap (layout, priv->wrap_mode);
/* Cases, assuming ellipsize != NONE on actor:
*
}
}
- /* we do not limit the layout width on editable, single-line
- * text actors, since those can scroll the layout
+ /* We do not limit the layout width on editable, single-line text
+ * actors, since those can scroll the layout. For non-editable
+ * actors we only want to set the width if wrapping or ellipsizing
+ * is enabled.
*/
if (allocation_width > 0 &&
- !(priv->editable && priv->single_line_mode))
+ (priv->editable ? !priv->single_line_mode
+ : (priv->ellipsize != PANGO_ELLIPSIZE_NONE || priv->wrap)))
{
gint width;
pango_layout_set_wrap (data->test_layout, PANGO_WRAP_WORD);
g_assert (check_result (data, "Enable line wrap", TRUE) == FALSE);
-#if 0
/* TEST 11: change wrap mode
* FIXME - broken
*/
PANGO_WRAP_CHAR);
pango_layout_set_wrap (data->test_layout, PANGO_WRAP_CHAR);
g_assert (check_result (data, "Change wrap mode", TRUE) == FALSE);
-#endif
/* TEST 12: enable justify */
clutter_text_set_justify (CLUTTER_TEXT (data->label), TRUE);