ActionRow#

class ActionRow(**properties: Any)#

Superclasses: PreferencesRow, ListBoxRow, Widget, InitiallyUnowned, Object

Subclasses: ComboRow, SpinRow, SwitchRow

Implemented Interfaces: Accessible, Actionable, Buildable, ConstraintTarget

A ListBoxRow used to present actions.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/action-row.png

The AdwActionRow widget can have a title, a subtitle and an icon. The row can receive additional widgets at its end, or prefix widgets at its start.

It is convenient to present a preference and its related actions.

AdwActionRow is unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won’t change the row’s activatability.

AdwActionRow as GtkBuildable#

The AdwActionRow implementation of the Buildable interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a <child> element.

It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.

CSS nodes#

AdwActionRow has a main CSS node with name row.

It contains the subnode box.header for its main horizontal box, and box.title for the vertical box containing the title and subtitle labels.

It contains subnodes label.title and label.subtitle representing respectively the title label and subtitle label.

Style classes#

AdwActionRow can use the `.property <style-classes.html#property-rows>`__ style class to emphasize the row subtitle instead of the row title, which is useful for displaying read-only properties.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/property-row.png

When used together with the .monospace style class, only the subtitle becomes monospace, not the title or any extra widgets.

Constructors#

class ActionRow
classmethod new() Widget#

Creates a new AdwActionRow.

Methods#

class ActionRow
activate() None#

Activates self.

add_prefix(widget: Widget) None#

Adds a prefix widget to self.

Parameters:

widget – a widget

add_suffix(widget: Widget) None#

Adds a suffix widget to self.

Parameters:

widget – a widget

do_activate(self) None#
get_activatable_widget() Widget | None#

Gets the widget activated when self is activated.

get_icon_name() str | None#

Gets the icon name for self.

Deprecated since version 1.3: Use add_prefix to add an icon.

get_subtitle() str | None#

Gets the subtitle for self.

get_subtitle_lines() int#

Gets the number of lines at the end of which the subtitle label will be ellipsized.

get_subtitle_selectable() bool#

Gets whether the user can copy the subtitle from the label

Added in version 1.3.

get_title_lines() int#

Gets the number of lines at the end of which the title label will be ellipsized.

remove(widget: Widget) None#

Removes a child from self.

Parameters:

widget – the child to be removed

set_activatable_widget(widget: Widget | None = None) None#

Sets the widget to activate when self is activated.

The row can be activated either by clicking on it, calling activate, or via mnemonics in the title. See the use_underline property to enable mnemonics.

The target widget will be activated by emitting the mnemonic_activate signal on it.

Parameters:

widget – the target widget

set_icon_name(icon_name: str | None = None) None#

Sets the icon name for self.

Deprecated since version 1.3: Use add_prefix to add an icon.

Parameters:

icon_name – the icon name

set_subtitle(subtitle: str) None#

Sets the subtitle for self.

The subtitle is interpreted as Pango markup unless use_markup is set to FALSE.

Parameters:

subtitle – the subtitle

set_subtitle_lines(subtitle_lines: int) None#

Sets the number of lines at the end of which the subtitle label will be ellipsized.

If the value is 0, the number of lines won’t be limited.

Parameters:

subtitle_lines – the number of lines at the end of which the subtitle label will be ellipsized

set_subtitle_selectable(subtitle_selectable: bool) None#

Sets whether the user can copy the subtitle from the label

See also selectable.

Added in version 1.3.

Parameters:

subtitle_selectableTRUE if the user can copy the subtitle from the label

set_title_lines(title_lines: int) None#

Sets the number of lines at the end of which the title label will be ellipsized.

If the value is 0, the number of lines won’t be limited.

Parameters:

title_lines – the number of lines at the end of which the title label will be ellipsized

Properties#

class ActionRow
props.activatable_widget: Widget#

The type of the None singleton.

props.icon_name: str#

The type of the None singleton.

Deprecated since version 1.3: Use add_prefix to add an icon.

props.subtitle: str#

The type of the None singleton.

props.subtitle_lines: int#

The type of the None singleton.

props.subtitle_selectable: bool#

The type of the None singleton.

Added in version 1.3.

props.title_lines: int#

The type of the None singleton.

Signals#

class ActionRow.signals
activated() None#

The type of the None singleton.

Virtual Methods#

class ActionRow
do_activate() None#

Activates self.

Fields#

class ActionRow
parent_instance#