[maemo-commits] [maemo-commits] r10814 - in projects/haf/trunk/hildon-desktop: . libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Mar 29 09:39:05 EEST 2007
Author: jobi
Date: 2007-03-29 09:39:03 +0300 (Thu, 29 Mar 2007)
New Revision: 10814

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-window.c
Log:

2007-03-29  Johan Bilien  <johan.bilien at nokia.com>

	* libhildondesktop/hildon-desktop-home-item.c:
	- never snap to outside the area
	* libhildondesktop/hildon-home-window.c:
	- fixed wrong allocation



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-03-28 14:17:21 UTC (rev 10813)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-03-29 06:39:03 UTC (rev 10814)
@@ -1,3 +1,10 @@
+2007-03-29  Johan Bilien  <johan.bilien at nokia.com>
+
+	* libhildondesktop/hildon-desktop-home-item.c:
+	- never snap to outside the area
+	* libhildondesktop/hildon-home-window.c:
+	- fixed wrong allocation
+
 2007-03-28  Johan Bilien  <johan.bilien at nokia.com>
 
 	* configure.ac: 0.0.1

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c	2007-03-28 14:17:21 UTC (rev 10813)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-home-item.c	2007-03-29 06:39:03 UTC (rev 10814)
@@ -1269,11 +1269,15 @@
           if (priv->delta_x || priv->delta_y)
             {
               x_grid = x - (x % GRID_SIZE);
-              if (priv->delta_x > 0)
+              if (priv->delta_x > 0
+                  && !(x_grid + GRID_SIZE + widget->allocation.width >
+                       parent->allocation.width))
                 x_grid += GRID_SIZE;
               
               y_grid = y - (y % GRID_SIZE);
-              if (priv->delta_y > 0)
+              if (priv->delta_y > 0
+                  && !(y_grid + GRID_SIZE + widget->allocation.height >
+                       parent->allocation.height))
                 y_grid += GRID_SIZE;
 
               gtk_fixed_move (GTK_FIXED (parent), widget, x_grid, y_grid);
@@ -1291,7 +1295,8 @@
                 {
                   x_grid -= x_grid % GRID_SIZE;
 
-                  if (priv->delta_x > 0)
+                  if (priv->delta_x > 0 
+                      && !(x_grid + GRID_SIZE > parent->allocation.width))
                     x_grid += GRID_SIZE;
                 }
               
@@ -1302,7 +1307,8 @@
                 {
                   y_grid -= y_grid % GRID_SIZE;
 
-                  if (priv->delta_y > 0)
+                  if (priv->delta_y > 0
+                      && !(y_grid + GRID_SIZE > parent->allocation.height))
                     y_grid += GRID_SIZE;
                 }
 

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-window.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-window.c	2007-03-28 14:17:21 UTC (rev 10813)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-home-window.c	2007-03-29 06:39:03 UTC (rev 10814)
@@ -454,10 +454,12 @@
 
       child_allocation.y += child_allocation.height + padding_top;
       child_allocation.height = priv->work_area->height -
-                                child_allocation.height - padding_bottom;
+                                child_allocation.height - padding_bottom
+                                - padding_top;
 
       child_allocation.x = priv->work_area->x + padding_left;
-      child_allocation.width = priv->work_area->width - padding_right;
+      child_allocation.width = priv->work_area->width - padding_right
+                               - padding_left;
       
       gtk_widget_size_allocate (priv->applet_area, &child_allocation);
     }


More information about the maemo-commits mailing list