Adw.PreferencesRow

g Adw.PreferencesRow Adw.PreferencesRow 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:

Adw.ActionRow, Adw.EntryRow, Adw.ExpanderRow

Methods

Inherited:

Gtk.ListBoxRow (12), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Actionable (5)

Structs:

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

class

new ()

get_title ()

get_title_selectable ()

get_use_markup ()

get_use_underline ()

set_title (title)

set_title_selectable (title_selectable)

set_use_markup (use_markup)

set_use_underline (use_underline)

Virtual Methods

Inherited:

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

Properties

Inherited:

Gtk.ListBoxRow (3), Gtk.Widget (34), Gtk.Accessible (1), Gtk.Actionable (2)

Name

Type

Flags

Short Description

title

str

r/w/en

title-selectable

bool

r/w/en

use-markup

bool

r/w/en

use-underline

bool

r/w/en

Signals

Inherited:

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

Fields

Inherited:

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

Name

Type

Access

Description

parent_instance

Gtk.ListBoxRow

r

Class Details

class Adw.PreferencesRow(**kwargs)
Bases:

Gtk.ListBoxRow

Abstract:

No

Structure:

Adw.PreferencesRowClass

A [class`Gtk`.ListBoxRow] used to present preferences.

The AdwPreferencesRow widget has a title that [class`PreferencesDialog`] will use to let the user look for a preference. It doesn’t present the title in any way and lets you present the preference as you please.

[class`ActionRow`] and its derivatives are convenient to use as preference rows as they take care of presenting the preference’s title while letting you compose the inputs of the preference around it.

classmethod new()
Returns:

the newly created AdwPreferencesRow

Return type:

Gtk.Widget

Creates a new AdwPreferencesRow.

get_title()
Returns:

the title

Return type:

str

Gets the title of the preference represented by self.

get_title_selectable()
Returns:

whether the user can copy the title from the label

Return type:

bool

Gets whether the user can copy the title from the label

New in version 1.1.

get_use_markup()
Returns:

whether to use markup

Return type:

bool

Gets whether to use Pango markup for the title label.

New in version 1.2.

get_use_underline()
Returns:

whether an embedded underline in the title indicates a mnemonic

Return type:

bool

Gets whether an embedded underline in the title indicates a mnemonic.

set_title(title)
Parameters:

title (str) – the title

Sets the title of the preference represented by self.

The title is interpreted as Pango markup unless [property`PreferencesRow`:py:data::use-markup<Adw.PreferencesRow.props.use_markup>] is set to FALSE.

set_title_selectable(title_selectable)
Parameters:

title_selectable (bool) – TRUE if the user can copy the title from the label

Sets whether the user can copy the title from the label

See also [property`Gtk`.Label:selectable].

New in version 1.1.

set_use_markup(use_markup)
Parameters:

use_markup (bool) – whether to use markup

Sets whether to use Pango markup for the title label.

Subclasses may also use it for other labels, such as subtitle.

See also [func`Pango`.parse_markup].

New in version 1.2.

set_use_underline(use_underline)
Parameters:

use_underline (bool) – TRUE if underlines in the text indicate mnemonics

Sets whether an embedded underline in the title indicates a mnemonic.

Property Details

Adw.PreferencesRow.props.title
Name:

title

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The title of the preference represented by this row.

The title is interpreted as Pango markup unless [property`PreferencesRow`:py:data::use-markup<Adw.PreferencesRow.props.use_markup>] is set to FALSE.

Adw.PreferencesRow.props.title_selectable
Name:

title-selectable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the user can copy the title from the label.

See also [property`Gtk`.Label:selectable].

New in version 1.1.

Adw.PreferencesRow.props.use_markup
Name:

use-markup

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to use Pango markup for the title label.

Subclasses may also use it for other labels, such as subtitle.

See also [func`Pango`.parse_markup].

New in version 1.2.

Adw.PreferencesRow.props.use_underline
Name:

use-underline

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether an embedded underline in the title indicates a mnemonic.