On Mon, Jun 16, 2008 at 5:58 PM, Marco Pesenti Gritti <[EMAIL PROTECTED]> wrote: > On Mon, Jun 16, 2008 at 3:27 PM, Tomeu Vizoso <[EMAIL PROTECTED]> wrote: >> Hi, >> >> this implements some missing pieces from the layout algorithm >> specified by Eben. Icons don't move smoothly towards their new >> position, though. > > + if rect.x + rect.width < self.width - 1 and \ > + rect.y + rect.height < self.height - 1: > + new_rects.append(gtk.gdk.Rectangle(rect.x + 1, rect.y + 1, > + rect.width, rect.height)) > > A comment that you are handling diagonals would probably be useful.
Ok. > if best_rect: > - self._move_child(child, best_rect) > + child.grid_rect = best_rect > + weight = self._shift_child(child, weight) > > I'm not to understand this recursion. Is it supposed to keep shifting > until it finds the best possible place? It will shift until it stops improving, this was the bigger difference with Eben's demo. Thanks, Tomeu _______________________________________________ Sugar mailing list [email protected] http://lists.laptop.org/listinfo/sugar

