Package: gtk

Class gtk:font-button

Superclasses

Documented Subclasses

None

Direct Slots

modal
The font-name property of type :boolean (Read / Write)
Whether the dialog is modal.
Default value: true
title
The title property of type :string (Read / Write)
The title of the font chooser dialog.
Default value: "Pick a Font"
use-font
The use-font property of type :boolean (Read / Write)
If this property is set to true, the label will be drawn in the selected font.
Default value: false
use-size
The use-size property of type :boolean (Read / Write)
If this property is set to true, the label will be drawn with the selected font size.
Default value: false

Details

The gtk:font-button widget is a button which displays the currently selected font and allows to open a font chooser dialog to change the font. It is a suitable widget for selecting a font in a preference dialog.

Figure: GtkFontButton

CSS nodes

The gtk:font-button implementation has a single CSS node with name button and .font style class.

Warning

The gtk:font-button implementation is deprecated since 4.10. Use the gtk:font-dialog-button widget instead.

Signal Details

The "activate" signal
lambda (fontbutton)    :run-first      
fontbutton
The gtk:font-button widget which received the signal.
Emitted to when the font button is activated. The signal on the gtk:font-button widget is an action signal and emitting it causes the button to present its dialog. Since 4.4
The "font-set" signal
lambda (fontbutton)    :run-first      
fontbutton
The gtk:font-button widget which received the signal.
The signal is emitted when the user selects a font. When handling this signal, use the gtk:font-chooser-font function to find out which font was just selected. Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the "notify::font-name" signal.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-5-22