Sugar Learning Environment, Activity Toolkit, GTK 3.
Go to file
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>
2012-11-07 09:57:33 -03:00
bin Set default python encoding to utf-8 2012-09-26 13:29:07 +02:00
examples Add examples for Alert, Animator, ComboBox, IconEntry and Notebook 2011-12-13 17:19:53 -03:00
m4 Add simple toolbars example 2009-07-10 04:07:10 +00:00
po Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 2012-10-13 21:31:53 +02:00
src Set correct padding and size for the palette, window implementation - SL #4144 2012-11-07 09:57:33 -03:00
tests Add two testcases: tabs with and without buttons, and sensitive text 2012-11-01 10:23:49 -03:00
.gitignore Switch sugarext to be an introspectable library 2011-12-13 17:19:52 -03:00
AUTHORS
autogen.sh Allow to build outside source directory 2012-08-07 18:55:38 +02:00
configure.ac Release 0.97.8 2012-10-25 16:25:20 +02:00
COPYING
MAINTAINERS Add MAINTAINERS file 2011-12-13 17:37:50 -03:00
Makefile.am sugar-activity: import and make independent of sugar-toolkit GTK versions 2011-12-13 17:35:30 -03:00
README

Sugar is the core of the OLPC Human Interface. The toolkit provides
a set of widgets to build HIG compliant applications and interfaces
to interact with system services like presence and the datastore.