[gtk+/native-layout] Fixed testellipsize
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/native-layout] Fixed testellipsize
- Date: Mon, 19 Apr 2010 18:16:07 +0000 (UTC)
commit e9e3725ee75642e4b90293c2458669e8457b1df4
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Apr 19 14:04:20 2010 -0400
Fixed testellipsize
gtk/gtklabel.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 31eb186..592821b 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3024,9 +3024,10 @@ get_label_width (GtkLabel *label,
*natural = MAX (*minimum, max_width);
}
- }
+ }
else
{
+ /* XXX Do something about width_chars/max_width_chars when no ellipsize/wrap is set */
*minimum = text_width;
*natural = *minimum;
}
@@ -3424,9 +3425,9 @@ gtk_label_get_desired_size (GtkExtendedLayout *layout,
(required_rect.width + label->misc.xpad * 2), minimum_size, natural_size);
else
{
- /* If there is no wrapping, the height is static */
+ /* If there is no wrapping, the height is either static or rotated and ellipsized */
*minimum_size = required_rect.height + label->misc.ypad * 2;
- *natural_size = *minimum_size;
+ *natural_size = natural_rect.height + label->misc.ypad * 2;
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]