Package: gtk

Class gtk:font-dialog-button

Superclasses

Documented Subclasses

None

Direct Slots

dialog
The dialog property of type gtk:font-dialog (Read / Write)
The font dialog that contains parameters for the font chooser dialog.
font-desc
The font-desc property of type pango:font-description (Read / Write)
The selected font. This property can be set to give the button its initial font, and it will be updated to reflect the users choice in the font chooser dialog. Listen to "notify::font-desc" signal to get informed about changes to the buttons font.
font-features
The font-features property of type :string (Read / Write)
The selected font features. This property will be updated to reflect the users choice in the font chooser dialog. Listen to the "notify::font-features" signal to get informed about changes to the buttons font features.
language
The language property of type pango:language (Read / Write)
The selected language for font features. This property will be updated to reflect the users choice in the font chooser dialog. Listen to "notify::language" to get informed about changes to the buttons language.
level
The level property of type gtk:font-level (Read / Write)
The level of detail for the font chooser dialog.
Default value: :font
use-font
The use-font property of type :boolean (Read / Write)
Whether the buttons label will be drawn in the selected font.
Default value: false
use-size
The use-size property of type :boolean (Read / Write)
Whether the buttons label will use the selected font size.
Default value: false

Details

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

Figure: GtkFontButton

It is the suitable widget for selecting a font in a preference dialog.

Since 4.10

CSS nodes

fontbutton
╰── button.font
    ╰── [content]    
The gtk:font-dialog-button widget has a single CSS node with name fontbutton which contains a button node with the .font style class.

Signal Details

The "activate" signal
lambda (fontbutton)    :run-first      
fontbutton
The gtk:font-dialog-button widget which received the signal.
Emitted when the font 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
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

#2023-10-19