Skip to main content

Variable: AdwSwitchRow

const AdwSwitchRow: "AdwSwitchRow"

Defined in: generated/jsx.ts:20016

A Gtk.ListBoxRow used to represent two states.

switch-row

The AdwSwitchRow widget contains a Gtk.Switch that allows the user to select between two states: "on" or "off". When activated, the row will invert its active state.

The user can control the switch by activating the row or by dragging on the switch handle.

See Gtk.Switch for details.

Example of an AdwSwitchRow UI definition:

<object class="AdwSwitchRow">
<property name="title" translatable="yes">Switch Row</property>
<signal name="notify::active" handler="switch_row_notify_active_cb"/>
</object>

The SwitchRow.active property should be connected to in order to monitor changes to the active state.

Accessibility

AdwSwitchRow uses the GTK_ACCESSIBLE_ROLE_SWITCH role.