gnome-control-center/panels/common/cc-list-row.ui
Christopher Davis e637f47e78 cc-list-row: Subclass AdwActionRow
AdwActionRow handles many of the properties we use
CcListRow for. We can re-use it instead of re-creating it.

CcListRow is now an AdwActionRow with three suffixes.
The `activatable-widget` is set when the switch is visible.

Since our `icon-name` property was only used for the arrow
icon, it has been replaced with a `show-arrow` property.

The `bold` property has been removed - it was only used in
one place, and it's not a pattern used in other apps.

I decided to go this route because replacing all the
instances of CcListRow with AdwActionRow directly would
end up being more code.
2022-01-06 08:56:12 -08:00

37 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="CcListRow" parent="AdwActionRow">
<property name="activatable">True</property>
<!-- Secondary Label -->
<child type="suffix">
<object class="GtkLabel" id="secondary_label">
<property name="valign">center</property>
<property name="ellipsize">end</property>
<property name="selectable" bind-source="CcListRow" bind-property="activatable" bind-flags="sync-create|invert-boolean" />
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<!-- Switch -->
<child type="suffix">
<object class="GtkSwitch" id="enable_switch">
<property name="visible">False</property>
<property name="valign">center</property>
<signal name="notify::active" handler="cc_list_row_switch_active_cb" swapped="yes"/>
</object>
</child>
<!-- Arrow -->
<child type="suffix">
<object class="GtkImage" id="arrow">
<property name="visible" bind-source="CcListRow" bind-property="show-arrow" bind-flags="sync-create"/>
<property name="valign">center</property>
<property name="icon-name">go-next-symbolic</property>
</object>
</child>
</template>
</interface>