Package: gtk

Class gtk-font-button

Superclasses

Documented Subclasses

None

Direct Slots

font-name
The font-name property of type :string (Read / Write)
The name of the currently selected font.
Warning: The font-name property has been deprecated since version 3.22 and should not be used in newly written code. Use the font property instead.
Default value: "Sans 12"
show-size
The show-size property of type :boolean (Read / Write)
If this property is set to true, the selected font size will be shown in the label. For a more WYSIWYG way to show the selected size, see the use-size property.
Default value: true
show-style
The show-style property of type :boolean (Read / Write)
If this property is set to true, the name of the selected font style will be shown in the label. For a more WYSIWYG way to show the selected style, see the use-font property.
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.

CSS nodes

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

Signal Details

The "font-set" signal
 lambda (widget)    : Run First      
The "font-set" signal is emitted when the user selects a font. When handling this signal, use the function gtk-font-chooser-font 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.
widget
The gtk-font-button widget which received the signal.
 

Slot Access Functions

Inherited Slot Access Functions

*2021-2-11