2009-02-19 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Thu, 19 Feb 2009 14:42:46 +0000 (14:42 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Thu, 19 Feb 2009 14:42:46 +0000 (14:42 +0000)
* src/hildon-banner.c:
Update the maximum width of timed banners.
(force_to_wrap_truncated): Enforce the maximum text width if the
label is wrapped.

Fixes: NB#102413 (The text margins (wrapping) in information
banner should be HILDON_MARGIN_TRIPLE)

ChangeLog
src/hildon-banner.c

index 89774d0..662156f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-02-19  Alberto Garcia  <agarcia@igalia.com>
+
+       * src/hildon-banner.c:
+       Update the maximum width of timed banners.
+       (force_to_wrap_truncated): Enforce the maximum text width if the
+       label is wrapped.
+
+       Fixes: NB#102413 (The text margins (wrapping) in information
+       banner should be HILDON_MARGIN_TRIPLE)
+
 2009-02-19  Claudio Saavedra  <csaavedra@igalia.com>
 
        Patch by Gabriel Schulhof (gabriel.schulhof@nokia.com)
index 13a29bb..f458ee9 100644 (file)
@@ -78,7 +78,8 @@
 
 #define                                         HILDON_BANNER_PROGRESS_WIDTH 104
 
-#define                                         HILDON_BANNER_LABEL_MAX_TIMED 375
+#define                                         HILDON_BANNER_LABEL_MAX_TIMED \
+                                                (800 - ((HILDON_MARGIN_TRIPLE) * 2))
 
 #define                                         HILDON_BANNER_LABEL_MAX_PROGRESS 375 /*265*/
 
@@ -659,7 +660,8 @@ force_to_wrap_truncated                         (HildonBanner *banner)
      * width, enforce the maximum allowed width now.
      */
     if (priv->has_been_wrapped
-        || width_text >= width_max) {
+        || width_text >= width_max
+        || pango_layout_is_wrapped (layout)) {
         /* Force wrapping by setting the maximum size */
         width = width_max;