8 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
AbrahmAB a803876fbf Added new popwindow module in sugar3.graphics 8 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
Manuel Quiñones 693eaab975 New ProgressIcon widget - SL #4384
A new icon widget useful to display progress.  It is compatible with
sugar3.graphics.icon.Icon .  The progress is represented filling the
icon.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
11 years ago
Manuel Quiñones 5505eb30bf Set correct padding and size for the palette, window implementation - SL #4144
A new API is provided: PaletteMenuBox is a container to be used in
Palette.set_content().  This is to hide the implementation details and
set the corresponding paddings and sizes.

Usage:

  box = PaletteMenuBox()
  palette.set_content(box)

Then we can append items to it, like:

  item = PaletteMenuItem(text_label, icon, xo_color=xo_color)
  box.append_child(item)

  separator = PaletteMenuItemSeparator()
  box.append_child(item)

We can also append any widget, and the box will handle the paddings:

  box.append_child(widget)

style.DEFAULT_PADDING for horizontal and vertical padding is the
default.  But can be overriden:

  box.append_child(widget, horizontal_padding=0, vertical_padding=0)

Details:

- move palettemenuitem.py to palettemenu.py

- Width of palette: make it a minimun size of 3 Sugar grid cells.

- Padding of content, secondary box: we need top and bottom padding,
  which can be set when packing the items container inside the
  secondary box.

- Padding of menu items: needs to be just for left and right, so move
  the padding to a new horizontal box.

- Padding of separators: unlike GtkSeparatorMenuItem, GtkSeparator
  doesn't support padding.  But we can wrap it in a GtkEventBox and
  force the height of the widget there.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer 2d0ac2a952 Add new PaletteMenuItem widget for usage in mixed content Palettes
As Palettes can either include a Gtk.Menu or a Gtk.Window we
have to use a "false" menu when we want to have both
functionality in a Palette. This is a new class PaletteMenuItem
for those use cases.

Code highly based on the work from Gonzalo Odiard. The API is
based on the one from GtkImageMenuItem [1].

[1] http://developer.gnome.org/gtk3/3.4/GtkImageMenuItem.html

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer 9cb18cdcf3 Remove Canvas* widgets and other hippo-canvas using parts
hippo-canvas isn't available in the GTK3 world, so we need to remove
anything that depends on it. Activities that still use it will need replace
hippo-canvas based widgets with native GTK ones before they can be ported to
GTK3.

[replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 000ed75cbe Rename the module to sugar3
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago