Adw.ButtonRow

g Adw.ButtonRow Adw.ButtonRow Adw.PreferencesRow Adw.PreferencesRow Adw.PreferencesRow->Adw.ButtonRow GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Actionable Gtk.Actionable GObject.GInterface->Gtk.Actionable Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.ListBoxRow Gtk.ListBoxRow Gtk.Actionable->Gtk.ListBoxRow Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.ListBoxRow->Adw.PreferencesRow Gtk.Widget->Gtk.ListBoxRow

Subclasses:

None

Methods

Inherited:

Adw.PreferencesRow (9), Gtk.ListBoxRow (12), Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (17), Gtk.Buildable (1), Gtk.Actionable (5)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

get_end_icon_name ()

get_start_icon_name ()

set_end_icon_name (icon_name)

set_start_icon_name (icon_name)

Virtual Methods

Inherited:

Gtk.ListBoxRow (1), Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.Actionable (4)

Properties

Inherited:

Adw.PreferencesRow (4), Gtk.ListBoxRow (3), Gtk.Widget (35), Gtk.Accessible (1), Gtk.Actionable (2)

Name

Type

Flags

Short Description

end-icon-name

str

r/w/en

start-icon-name

str

r/w/en

Signals

Inherited:

Gtk.ListBoxRow (1), Gtk.Widget (13), GObject.Object (1)

Name

Short Description

activated

This signal is emitted after the row has been activated.

Fields

Inherited:

Gtk.ListBoxRow (1), Gtk.Widget (13), GObject.Object (1)

Class Details

class Adw.ButtonRow(**kwargs)
Bases:

Adw.PreferencesRow

Abstract:

No

Structure:

Adw.ButtonRowClass

A [class`Gtk`.ListBoxRow] that looks like a button.

<picture> <source srcset=”button-rows-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”button-rows.png” alt=”button-rows”> </picture>

The AdwButtonRow widget has a title and two icons: before and after the title.

It is convenient for presenting actions like “Delete” at the end of a boxed list.

AdwButtonRow is always activatable.

CSS nodes

AdwButtonRow has a main CSS node with name row and the style class .button.

It contains the subnode box for its main horizontal box, which contains the nodes: image.icon.start for the start icon, label.title for the title, and image.icon.end for the end icon.

Style classes

The .suggested-action style class makes AdwButtonRow use accent color for its background. It should be used very sparingly to denote important buttons.

<picture> <source srcset=”button-row-suggested-action-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”button-row-suggested-action.png” alt=”button-row-suggested-action”> </picture>

The .destructive-action style makes the row use destructive colors. It can be used to draw attention to the potentially damaging consequences of using it. This style acts as a warning to the user.

<picture> <source srcset=”button-row-destructive-action-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”button-row-destructive-action.png” alt=”button-row-destructive-action”> </picture>

New in version 1.6.

classmethod new()
Returns:

the newly created AdwButtonRow

Return type:

Gtk.Widget

Creates a new AdwButtonRow.

New in version 1.6.

get_end_icon_name()
Returns:

the end icon name for self

Return type:

str or None

Gets the end icon name for self.

New in version 1.6.

get_start_icon_name()
Returns:

the start icon name for self

Return type:

str or None

Gets the start icon name for self.

New in version 1.6.

set_end_icon_name(icon_name)
Parameters:

icon_name (str or None) – the end icon name

Sets the end icon name for self.

New in version 1.6.

set_start_icon_name(icon_name)
Parameters:

icon_name (str or None) – the start icon name

Sets the start icon name for self.

New in version 1.6.

Signal Details

Adw.ButtonRow.signals.activated(button_row)
Signal Name:

activated

Flags:

RUN_LAST

Parameters:

button_row (Adw.ButtonRow) – The object which received the signal

This signal is emitted after the row has been activated.

New in version 1.6.

Property Details

Adw.ButtonRow.props.end_icon_name
Name:

end-icon-name

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The icon name to show after the title.

New in version 1.6.

Adw.ButtonRow.props.start_icon_name
Name:

start-icon-name

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The icon name to show before the title.

New in version 1.6.