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/favoriteslayout.py2
-rw-r--r--src/jarabe/desktop/snowflakelayout.py12
2 files changed, 12 insertions, 2 deletions
diff --git a/src/jarabe/desktop/favoriteslayout.py b/src/jarabe/desktop/favoriteslayout.py
index 5f3b560..635a534 100644
--- a/src/jarabe/desktop/favoriteslayout.py
+++ b/src/jarabe/desktop/favoriteslayout.py
@@ -175,7 +175,7 @@ class SpreadLayout(ViewLayout):
width, height = self._get_child_grid_size(child)
self._grid.add(child, width, height, None, None, locked=False)
- requisition = child.size_request()
+ requisition = child.get_preferred_size()[0]
rect = self._grid.get_child_rect(child)
child_allocation = Gdk.Rectangle()
child_allocation.x = int(round(rect.x * _CELL_SIZE))
diff --git a/src/jarabe/desktop/snowflakelayout.py b/src/jarabe/desktop/snowflakelayout.py
index 5ad5f26..9f47912 100644
--- a/src/jarabe/desktop/snowflakelayout.py
+++ b/src/jarabe/desktop/snowflakelayout.py
@@ -71,10 +71,20 @@ class SnowflakeLayout(Gtk.Container):
del self._children[child]
self.remove(child)
- def do_size_request(self, requisition):
+ def do_get_preferred_size(self):
size = self._calculate_size()
+ requisition = Gtk.Requisition()
requisition.width = size
requisition.height = size
+ return (requisition, requisition)
+
+ def do_get_preferred_width(self):
+ size = self._calculate_size()
+ return (size, size)
+
+ def do_get_preferred_height(self):
+ size = self._calculate_size()
+ return (size, size)
def do_size_allocate(self, allocation):
self.set_allocation(allocation)