From e8a365ce36da1e61225520dc313b654fe49c7dd9 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sat, 17 Apr 2010 23:06:24 -0400 Subject: [PATCH] Restore functionality where ellipsizing label *minimum* size grows to "max-char-width". --- gtk/gtklabel.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 07546a3250..911b790e2e 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -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); } }