sugar4.graphics.palette
Classes
Floating palette implementation. |
|
Module Contents
- class sugar4.graphics.palette.Palette(label=None, accel_path=None, text_maxlen=style.MENU_WIDTH_CHARS, **kwargs)[source]
Bases:
sugar4.graphics.palettewindow.PaletteWindowFloating palette implementation.
This class dynamically switches between one of two encapsulated child widget types: a _PaletteWindowWidget or a _PaletteMenuWidget.
The window widget, created by default, acts as the container for any type of widget the user may wish to add. It can optionally display primary text, secondary text, and an icon at the top of the palette.
If the user attempts to access the ‘menu’ property, the window widget is destroyed and the palette is dynamically switched to use a menu widget. This maintains the same look and feel as a normal palette, allowing submenus and so on.
- popdown(immediate=False, state=None)[source]
Hide the palette.
- Parameters:
immediate (bool) – if True, hide instantly. If False, use animation.
state – deprecated parameter, ignored.