Restore functionality where ellipsizing label *minimum* size grows to "max-char-width".

This commit is contained in:
Tristan Van Berkom 2010-04-17 23:06:24 -04:00
parent 64e23c42bd
commit e8a365ce36

View File

@ -2994,6 +2994,15 @@ get_label_char_width (GtkLabel *label,
gint max_char_width = char_pixels * priv->max_width_chars;
gint max_width = MIN (text_width, max_char_width);
/* With max-char-width specified, we let the minimum widths of
* ellipsized text crawl up to the max-char-width
* (note that we dont want to limit the minimum width for wrapping text).
*/
if (label->ellipsize)
{
*minimum = MIN (text_width, max_width);
}
*natural = MAX (rect.width, max_width);
}
}