nautilus r14484 - in trunk: . libnautilus-private



Author: cneumair
Date: Sat Aug 16 22:11:31 2008
New Revision: 14484
URL: http://svn.gnome.org/viewvc/nautilus?rev=14484&view=rev

Log:
2008-08-17  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-icon-canvas-item.c
	(draw_or_measure_label_text):
	Obey one-line constraint in compact mode.


Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-icon-canvas-item.c

Modified: trunk/libnautilus-private/nautilus-icon-canvas-item.c
==============================================================================
--- trunk/libnautilus-private/nautilus-icon-canvas-item.c	(original)
+++ trunk/libnautilus-private/nautilus-icon-canvas-item.c	Sat Aug 16 22:11:31 2008
@@ -1010,6 +1010,9 @@
 	}
 }
 
+#define IS_COMPACT_VIEW(container) \
+        container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_L_R && \
+        container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE
 
 static void
 draw_or_measure_label_text (NautilusIconCanvasItem *item,
@@ -1095,9 +1098,11 @@
 
 	if (have_editable) {
 		editable_layout = get_label_layout (&details->editable_text_layout, item, details->editable_text);
-		if (needs_highlight ||
-		    details->is_prelit ||
-		    container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) {
+		if (IS_COMPACT_VIEW (container)) {
+			pango_layout_set_height (editable_layout, -1);
+		} else if (needs_highlight ||
+			   details->is_prelit ||
+			   container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) {
 			/* VOODOO-TODO, cf. compute_text_rectangle() */
 			pango_layout_set_height (editable_layout, G_MININT);
 		} else {
@@ -1899,10 +1904,6 @@
 	 (g_ascii_isdigit (*(p+1)) && \
 	  g_ascii_isdigit (*(p+2))))
 
-#define IS_COMPACT_VIEW(container) \
-        container->details->layout_mode == NAUTILUS_ICON_LAYOUT_T_B_L_R && \
-        container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE
-
 
 static PangoLayout *
 create_label_layout (NautilusIconCanvasItem *item,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]