summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-04-17 23:06:24 -0400
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-04-17 23:06:24 -0400
commite8a365ce36da1e61225520dc313b654fe49c7dd9 (patch)
tree5c4cb3702df9a4c62eb915034f5a11a08c2602a8 /gtk
parent64e23c42bdc107084b60647c4167f07f8e0f5a13 (diff)
downloadgdk-pixbuf-e8a365ce36da1e61225520dc313b654fe49c7dd9.tar.gz
Restore functionality where ellipsizing label *minimum* size grows to "max-char-width".
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtklabel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 07546a325..911b790e2 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);
}
}