:right-sidebar: True ButtonContent =================================================================== .. currentmodule:: gi.repository.Adw .. class:: ButtonContent(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` :Constructors: :: ButtonContent(**properties) new() -> Gtk.Widget Constructors ------------ .. rst-class:: interim-class .. class:: ButtonContent :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwButtonContent``. Methods ------- .. rst-class:: interim-class .. class:: ButtonContent :no-index: .. method:: get_can_shrink() -> bool gets whether the button can be smaller than the natural size of its contents. .. versionadded:: 1.4 .. method:: get_icon_name() -> str Gets the name of the displayed icon. .. method:: get_label() -> str Gets the displayed label. .. method:: get_use_underline() -> bool Gets whether an underline in the text indicates a mnemonic. .. method:: 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 :obj:`~gi.repository.Gtk.Button.set_can_shrink`. .. versionadded:: 1.4 :param can_shrink: whether the button can shrink .. method:: set_icon_name(icon_name: str) -> None Sets the name of the displayed icon. If empty, the icon is not shown. :param icon_name: the new icon name .. method:: set_label(label: str) -> None Sets the displayed label. :param label: the new label .. method:: 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 :obj:`~gi.repository.Adw.ButtonContent.props.label`. :param use_underline: whether an underline in the text indicates a mnemonic Properties ---------- .. rst-class:: interim-class .. class:: ButtonContent :no-index: .. attribute:: props.can_shrink :type: bool Whether the button can be smaller than the natural size of its contents. If set to ``TRUE``, the label will ellipsize. See :obj:`~gi.repository.Gtk.Button.props.can_shrink`. .. versionadded:: 1.4 .. attribute:: props.icon_name :type: str The name of the displayed icon. If empty, the icon is not shown. .. attribute:: props.label :type: str The displayed label. .. attribute:: props.use_underline :type: bool Whether an underline in the text indicates a mnemonic. The mnemonic can be used to activate the parent button. See :obj:`~gi.repository.Adw.ButtonContent.props.label`.