[maemo-commits] [maemo-commits] r13816 - in projects/haf/trunk/gtk+: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Sep 14 14:33:49 EEST 2007
Author: timj
Date: 2007-09-14 14:33:43 +0300 (Fri, 14 Sep 2007)
New Revision: 13816

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gtk/gtklabel.c
Log:
2007-09-14 13:24:14  Tim Janik  <timj at imendio.com>

        * gtk/gtklabel.c (gtk_label_ensure_layout): constrain wrap width by 85%
        of the screen width instead of 50%, which is more suitable on the maemo
        desktop. fixes NB#63754.




Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2007-09-14 11:22:09 UTC (rev 13815)
+++ projects/haf/trunk/gtk+/ChangeLog	2007-09-14 11:33:43 UTC (rev 13816)
@@ -1,3 +1,9 @@
+2007-09-14 13:24:14  Tim Janik  <timj at imendio.com>
+
+	* gtk/gtklabel.c (gtk_label_ensure_layout): constrain wrap width by 85%
+	of the screen width instead of 50%, which is more suitable on the maemo
+	desktop. fixes NB#63754.
+
 2007-07-26  Fernando Herrera  <fernando.herrera-de-las-heras at nokia.com>
 
 	* docs/reference/gtk/Makefile.am: fix GtkBuilder documentation build.

Modified: projects/haf/trunk/gtk+/gtk/gtklabel.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtklabel.c	2007-09-14 11:22:09 UTC (rev 13815)
+++ projects/haf/trunk/gtk+/gtk/gtklabel.c	2007-09-14 11:33:43 UTC (rev 13816)
@@ -2037,9 +2037,13 @@
 
 	      wrap_width = get_label_wrap_width (label);
 	      width = MIN (width, wrap_width);
+#ifndef MAEMO_CHANGES
 	      width = MIN (width,
 			   PANGO_SCALE * (gdk_screen_get_width (screen) + 1) / 2);
-	      
+#else
+	      width = MIN (width, PANGO_SCALE * (gdk_screen_get_width (screen) + 1) * 0.85);
+#endif
+              
 	      pango_layout_set_width (label->layout, width);
 	      pango_layout_get_extents (label->layout, NULL, &logical_rect);
 	      width = logical_rect.width;


More information about the maemo-commits mailing list