Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jarabe/desktop/spreadlayout.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jarabe/desktop/spreadlayout.py b/src/jarabe/desktop/spreadlayout.py
index 9200361..b5c623e 100644
--- a/src/jarabe/desktop/spreadlayout.py
+++ b/src/jarabe/desktop/spreadlayout.py
@@ -14,6 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import math
+
import hippo
import gobject
import gtk
@@ -78,8 +80,10 @@ class SpreadLayout(gobject.GObject, hippo.CanvasLayout):
def _get_child_grid_size(self, child):
min_width, width = child.get_width_request()
min_height, height = child.get_height_request(width)
+ width = math.ceil(width / _CELL_SIZE)
+ height = math.ceil(height / _CELL_SIZE)
- return int(width / _CELL_SIZE), int(height / _CELL_SIZE)
+ return int(width), int(height)
def _grid_child_changed_cb(self, grid, child):
child.emit_request_changed()