ButtonContent
-
class ButtonContent(**properties: Any)
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
- Constructors:
ButtonContent(**properties)
new() -> Gtk.Widget
Constructors
-
class ButtonContent
-
classmethod new() → Widget
Creates a new AdwButtonContent
.
Methods
-
class ButtonContent
-
get_can_shrink() → bool
gets whether the button can be smaller than the natural size of its contents.
-
get_icon_name() → str
Gets the name of the displayed icon.
-
get_label() → str
Gets the displayed label.
-
get_use_underline() → bool
Gets whether an underline in the text indicates a mnemonic.
-
set_can_shrink(can_shrink: bool) → None
Sets whether the button can be smaller than the natural size of its contents.
If set to TRUE
, the label will ellipsize.
See set_can_shrink
.
- Parameters:
can_shrink – whether the button can shrink
-
set_icon_name(icon_name: str) → None
Sets the name of the displayed icon.
If empty, the icon is not shown.
- Parameters:
icon_name – the new icon name
-
set_label(label: str) → None
Sets the displayed label.
- Parameters:
label – the new label
-
set_use_underline(use_underline: bool) → None
Sets whether an underline in the text indicates a mnemonic.
The mnemonic can be used to activate the parent button.
See label
.
- Parameters:
use_underline – whether an underline in the text indicates a mnemonic
Properties
-
class ButtonContent
-
props.can_shrink: bool
Whether the button can be smaller than the natural size of its contents.
If set to TRUE
, the label will ellipsize.
See can_shrink
.
-
props.icon_name: str
The name of the displayed icon.
If empty, the icon is not shown.
-
props.label: str
The displayed label.
-
props.use_underline: bool
Whether an underline in the text indicates a mnemonic.
The mnemonic can be used to activate the parent button.
See label
.