It derives from <GtkWidget>.
A helper widget for creating buttons.
<AdwButtonContent> is a box-like widget with
an icon and a label.
It’s intended to be used as a direct child of
<GtkButton>,
<GtkMenuButton> or SplitButton, when
they need to have both an icon and a label, as follows:
<object class="GtkButton">
<property name="child">
<object class="AdwButtonContent">
<property name="icon-name">document-open-symbolic</property>
<property name="label" translatable="yes">_Open</property>
<property name="use-underline">True</property>
</object>
</property>
</object>
<AdwButtonContent> handles style classes and
connecting the mnemonic to the button automatically.
buttoncontent
╰── box
├── image
╰── label
<AdwButtonContent>’s CSS node is called
buttoncontent. It contains a box subnode that serves as a
container for the image and label nodes.
When inside a <GtkButton> or
<AdwSplitButton>, the button will receive the
.image-text-button style class. When inside a
<GtkMenuButton>, the internal
<GtkButton> will receive it instead.
<AdwButtonContent> uses the
Gtk.AccessibleRole.group role.
Whether the button can be smaller than the natural size of its contents.
If set to TRUE, the label will ellipsize.
See button:can-shrink.
Its value is a boolean.
Set it with (set! (button-content:can-shrink self) value).
The name of the displayed icon.
If empty, the icon is not shown.
Its value is a string, or #f.
Set it with (set! (button-content:icon-name self) value).
The displayed label.
Its value is a string, or #f.
Set it with (set! (button-content:label self) value).
Whether an underline in the text indicates a mnemonic.
The mnemonic can be used to activate the parent button.
See ButtonContent:label.
Its value is a boolean.
Set it with (set! (button-content:use-underline self) value).
gets whether the button can be smaller than the natural size of its contents.
Passed: a <AdwButtonContent>.
a button content
Returned: a boolean.
whether the button can shrink
Gets the name of the displayed icon.
Passed: a <AdwButtonContent>.
a button content
Returned: a string.
the icon name
Gets the displayed label.
Passed: a <AdwButtonContent>.
a button content
Returned: a string.
the label
Gets whether an underline in the text indicates a mnemonic.
Passed: a <AdwButtonContent>.
a button content
Returned: a boolean.
whether an underline in the text indicates a mnemonic
Creates a new <AdwButtonContent>.
Returned: a <GtkWidget>.
the new created <AdwButtonContent>
Sets whether the button can be smaller than the natural size of its contents.
If set to TRUE, the label will ellipsize.
Passed: a <AdwButtonContent>.
a button content
Passed: a boolean.
whether the button can shrink
Sets the name of the displayed icon.
If empty, the icon is not shown.
Passed: a <AdwButtonContent>.
a button content
Passed: a string.
the new icon name
Sets the displayed label.
Passed: a <AdwButtonContent>.
a button content
Passed: a string.
the new label
Sets whether an underline in the text indicates a mnemonic.
The mnemonic can be used to activate the parent button.
See ButtonContent:label.
Passed: a <AdwButtonContent>.
a button content
Passed: a boolean.
whether an underline in the text indicates a mnemonic