Gtk.ColorDialogButton¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the color dialog button is activated. |
Fields¶
- Inherited:
Class Details¶
- class Gtk.ColorDialogButton(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
GtkColorDialogButton
is a wrapped around a [class`Gtk`.ColorDialog] and allows to open a color chooser dialog to change the color.An example
Gtk.ColorDialogButton
It is suitable widget for selecting a color in a preference dialog.
- CSS nodes
`` colorbutton ╰── button.color
╰── [content]
GtkColorDialogButton
has a single CSS node with name colorbutton which contains a button node. To differentiate it from a plainGtkButton
, it gets the .color style class.New in version 4.10.
- classmethod new(dialog)[source]¶
- Parameters:
dialog (
Gtk.ColorDialog
orNone
) – theGtkColorDialog
to use- Returns:
the new
GtkColorDialogButton
- Return type:
Creates a new
GtkColorDialogButton
with the givenGtkColorDialog
.You can pass
NULL
to this function and set aGtkColorDialog
later. The button will be insensitive until that happens.New in version 4.10.
- get_dialog()[source]¶
- Returns:
the
GtkColorDialog
- Return type:
Returns the
GtkColorDialog
of self.New in version 4.10.
- get_rgba()[source]¶
- Returns:
the color
- Return type:
Returns the color of the button.
This function is what should be used to obtain the color that was chosen by the user. To get informed about changes, listen to “notify::color”.
New in version 4.10.
- set_dialog(dialog)[source]¶
- Parameters:
dialog (
Gtk.ColorDialog
) – the newGtkColorDialog
Sets a
GtkColorDialog
object to use for creating the color chooser dialog that is presented when the user clicks the button.New in version 4.10.
Signal Details¶
- Gtk.ColorDialogButton.signals.activate(color_dialog_button)¶
- Signal Name:
activate
- Flags:
- Parameters:
color_dialog_button (
Gtk.ColorDialogButton
) – The object which received the signal
Emitted when the color dialog button is activated.
The
::activate
signal onGtkColorDialogButton
is an action signal and emitting it causes the button to pop up its dialog.New in version 4.14.
Property Details¶
- Gtk.ColorDialogButton.props.dialog¶
- Name:
dialog
- Type:
- Default Value:
- Flags:
The
GtkColorDialog
that contains parameters for the color chooser dialog.New in version 4.10.
- Gtk.ColorDialogButton.props.rgba¶
- Name:
rgba
- Type:
- Default Value:
- Flags:
The selected color.
This property can be set to give the button its initial color, and it will be updated to reflect the users choice in the color chooser dialog.
Listen to
notify::rgba
to get informed about changes to the buttons color.New in version 4.10.