- class sugar3.graphics.palette.Palette(label=None, accel_path=None, text_maxlen=60, **kwargs)¶
Floating 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 is a GtkMenu that retains the same look and feel as a normal palette, allowing submenus and so on. If primary text, secondary text and/or icons were provided, an initial menu entry is created containing widgets to display such information.
- do_set_property(pspec, value)¶
- popdown(immediate=False, state=None)¶
Popdown (or show the full contents of) the palette.
- Keyword Arguments
immediate (bool) – if True, the palette will be shown instantly (as if the user right clicked the item). If False, the palette will be shown after the usual activation wait time.
Deprecated since version 0.109: The state keyword argument is deprecated. The old secondary state has become the only state.
- set_primary_text(label, accel_path=None)¶