[sugar] [PATCH] Add RandomLayout and make it the default.

Marco Pesenti Gritti mpgritti
Mon Jun 16 10:42:21 EDT 2008


On Wed, Jun 11, 2008 at 9:06 PM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> Hi,
>
> this patch renames activitiesring.py to favoritesview.py and moves the
> layout stuff to favoriteslayout.py. Also adds to favoriteslayout.py
> RandomLayout.

I'm not fully convinced about the FavoritesLayout/FavoritesView
naming. It's not immediately clear that these are activities. Also it
might be a bit too specific, since we even considered dropping
favorites and showing all activities in that view. I can think of
Activities* or Home*, better ideas?

+            width = gtk.gdk.screen_width()
+            height = gtk.gdk.screen_height() - style.GRID_CELL_SIZE

+        width = gtk.gdk.screen_width()
+        height = gtk.gdk.screen_height() - style.GRID_CELL_SIZE

Would probably be better to use size requisition instead of "hardcoding" these.

+            self.fixed_positions[icon] = (relative_x * 1000 / width,
+                                           relative_y * 1000 / height)

Is 1000 big enough. We will lose precision. Should we just store it as a float?

+        hot_spot = style.zoom(10)
+        context.set_icon_pixbuf(pixbuf, hot_spot, hot_spot)

Seems arbitrary, but I don't have a better idea atm.

Marco



More information about the Sugar-devel mailing list