4 Commits (aa8a5e70c415e6c2acf4ff373d9b366ac4692bb1)

Author SHA1 Message Date
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
radicalonion 8b947ed02f Write docs for sugar3.graphics.scrollingdetector 8 years ago
Gonzalo Odiard 49365e132c New invoker, TreeViewInvoker
This new invoker is able to handle all the palettes on a treeview,
removing the need of one invoker per cell renderer (CellRendererInvoker).
This simplifies the code and makes it more efficient.
Also removes the logic from the CellRendererIcon, which
should only care about drawing itself. [1]

Is important to note than in Gtk3 a CellRenderer is not a GtkWidget
then can't know when the mouse is over it or have the usual events
used by other invokers, making the implementation CellRendererInvoker
very complicate.

This commit also removes the invoker of CellRendererIcon.

The ScrollingDetector logic is simplified too,
because now there are only one invoker instead of one by renderer
and the example code updated.

[1] https://developer.gnome.org/gtk3/stable/GtkCellRenderer.html
9 years ago
Gonzalo Odiard 5626a6c182 Detect scrolling in treviews and optimize drawing
Detecting if the treeview is scrolling we can improve the performance of
the CellRendererIcon by avoiding unneeded calculations.

The example scrollingdetector.py shows how this can be used.  The
changes are backward compatible.

Signed-off-by: Manuel Quiñones <manuel.por.aca@gmail.com>
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
9 years ago