Beispiel #1
0
    def __init__(self):
        ActivityLayout.__init__(self)

        min_width_, width = self.do_get_width_request()
        min_height_, height = self.do_get_height_request(width)

        self._grid = Grid(width / _CELL_SIZE, height / _CELL_SIZE)
        self._grid.connect('child-changed', self.__grid_child_changed_cb)
Beispiel #2
0
    def __init__(self):
        gobject.GObject.__init__(self)
        self._box = None

        min_width, width = self.do_get_width_request()
        min_height, height = self.do_get_height_request(width)

        self._grid = Grid(int(width / _CELL_SIZE), int(height / _CELL_SIZE))
        self._grid.connect('child-changed', self._grid_child_changed_cb)
Beispiel #3
0
 def setup(self, allocation, owner_icon, activity_icon=None):
     if self._grid is not None:
         if self._width == allocation.width and \
                 self._height == allocation.height:
             return
     self._width = allocation.width
     self._height = allocation.height
     self._grid = Grid(int(allocation.width / _CELL_SIZE),
                       int(allocation.height / _CELL_SIZE))
     self._grid.connect('child-changed', self.__grid_child_changed_cb)
     self._allocate_owner_icon(allocation, owner_icon, activity_icon)