Package: gtk

Class gtk:color-dialog-button

Superclasses

Documented Subclasses

None

Direct Slots

dialog
The dialog property of type gtk:color-dialog (Read / Write)
The gtk:color-dialog object that contains parameters for the color chooser dialog.
rgba
The rgba property of type gdk:rgba (Read / Write)
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 the "notify::rgba" signal to get informed about changes to the buttons color.
Default value: #s(gdk:rgba :red 0.0 :green 0.0 :blue 0.0 :alpha 0.0)

Details

The gtk:color-dialog-button widget is a wrapped around a gtk:color-dialog object and allows to open a color chooser dialog to change the color.

Figure: GtkColorDialogButton

It is a suitable widget for selecting a color in a preference dialog.

Since 4.10

CSS nodes

colorbutton
╰── button.color
    ╰── [content]    
The gtk:color-dialog-button implementation has a single CSS node with name colorbutton which contains a button node. To differentiate it from a plain gtk:button widget, it gets the .color style class.

Signals

The "activate" signal
lambda (button)    :action      
Emitted when the color dialog button is activated. The signal is an action signal and emitting it causes the button to pop up its dialog. The signal can be directly emitted on objects from user code. Since 4.14
 

Inherited Slot Access Functions

See also

2023-11-4