sugar4.graphics.colorbutton
Classes
Color tool button for GTK4 toolbar. |
Functions
|
Convert Gdk.RGBA to SVG hex color string. |
|
Module Contents
- sugar4.graphics.colorbutton.get_svg_color_string(color)[source]
Convert Gdk.RGBA to SVG hex color string.
- class sugar4.graphics.colorbutton.ColorToolButton(icon_name='color-preview', **kwargs)[source]
Bases:
gi.repository.Gtk.BoxColor tool button for GTK4 toolbar.
- set_accelerator(accelerator)[source]
Sets keyboard shortcut that activates this button.
- Parameters:
accelerator (string) – accelerator to be set. Should be in
<modifier>Letter (form)
Example
set_accelerator(self, ‘accel’)
- create_palette()[source]
The create_palette function is called when the palette needs to be invoked.
- Returns:
sugar4.graphics.palette.Palette, or None to indicate that you do not want a palette shown
- set_icon_name(icon_name)[source]
Sets the icon for the tool button from a named themed icon.
- Parameters:
icon_name (string) – The name for a themed icon.
too. (It can be set as 'None')
Example
set_icon_name(‘view-radial’)
- get_icon_name()[source]
The get_icon_name() method returns the value of the icon_name property that contains the name of a themed icon or None.