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

Tomeu Vizoso tomeu
Mon Jun 16 12:10:53 EDT 2008


On Mon, Jun 16, 2008 at 4:42 PM, Marco Pesenti Gritti
<mpgritti at gmail.com> wrote:
> 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.

Ok.

> +            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?

Ok, will store as 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.

Yeah, this part needs to be improved in general.

Thanks,

Tomeu



More information about the Sugar-devel mailing list