nautilus r14562 - in trunk: . libnautilus-private



Author: cneumair
Date: Mon Sep  1 15:34:56 2008
New Revision: 14562
URL: http://svn.gnome.org/viewvc/nautilus?rev=14562&view=rev

Log:
2008-09-01  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-icon-container.c
	(nautilus_icon_container_update_scroll_region):
	Fix RTL scroll region calculation.


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

Modified: trunk/libnautilus-private/nautilus-icon-container.c
==============================================================================
--- trunk/libnautilus-private/nautilus-icon-container.c	(original)
+++ trunk/libnautilus-private/nautilus-icon-container.c	Mon Sep  1 15:34:56 2008
@@ -1073,8 +1073,14 @@
 
 	/* Auto-layout assumes a 0, 0 scroll origin */
 	if (nautilus_icon_container_is_auto_layout (container)) {
-		x1 = 0;
-		y1 = 0;
+		if (nautilus_icon_container_is_layout_rtl (container)) {
+			allocation = &GTK_WIDGET (container)->allocation;
+			x2 = allocation->width;
+			y2 = allocation->height;
+		} else {
+			x1 = 0;
+			y1 = 0;
+		}
 	} else {
 		x1 -= CONTAINER_PAD_LEFT;
 		y1 -= CONTAINER_PAD_TOP;
@@ -1092,7 +1098,11 @@
 	 * which does not need a bottom border.
 	 */
 	if (nautilus_icon_container_is_layout_vertical (container)) {
-		x2 += ICON_PAD_RIGHT + CONTAINER_PAD_RIGHT;
+		if (nautilus_icon_container_is_layout_rtl (container)) {
+			x1 -= ICON_PAD_RIGHT + CONTAINER_PAD_RIGHT;
+		} else {
+			x2 += ICON_PAD_RIGHT + CONTAINER_PAD_RIGHT;
+		}
 	} else {
 		y2 += ICON_PAD_BOTTOM + CONTAINER_PAD_BOTTOM;
 	}



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