region: Switch to AdwPreferencesPage and AdwPreferencesGroup

This cleans up all the manual label shenanigans we've been
doing.
This commit is contained in:
Georges Basile Stavracas Neto 2022-02-05 11:54:21 -03:00
parent 97a1e8a3c1
commit 72742f9580

View file

@ -3,21 +3,15 @@
<template class="CcRegionPanel" parent="CcPanel"> <template class="CcRegionPanel" parent="CcPanel">
<child type="content"> <child type="content">
<object class="GtkScrolledWindow"> <object class="GtkBox">
<property name="hscrollbar-policy">never</property> <property name="orientation">vertical</property>
<child>
<object class="AdwClamp"> <child>
<property name="margin_top">32</property> <object class="AdwPreferencesPage">
<property name="margin_bottom">32</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<!-- Content -->
<child> <child>
<object class="GtkBox"> <object class="AdwPreferencesGroup">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="hexpand">True</property>
<child> <child>
<object class="GtkBox" id="session_or_login_box"> <object class="GtkBox" id="session_or_login_box">
<property name="orientation">horizontal</property> <property name="orientation">horizontal</property>
@ -45,24 +39,15 @@
</child> </child>
</object> </object>
</child> </child>
<child>
<object class="GtkLabel"> </object>
<property name="xalign">0</property> </child>
<property name="label" translatable="yes">Language</property>
<attributes> <child>
<attribute name="weight" value="bold"/> <object class="AdwPreferencesGroup">
</attributes> <property name="title" translatable="yes">Language</property>
</object> <property name="description" translatable="yes">The language used for text in windows and web pages.</property>
</child>
<child>
<object class="GtkLabel">
<property name="xalign">0</property>
<property name="label" translatable="yes">The language used for text in windows and web pages.</property>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<child> <child>
<object class="GtkListBox" id="language_list"> <object class="GtkListBox" id="language_list">
<property name="margin_bottom">18</property> <property name="margin_bottom">18</property>
@ -154,24 +139,15 @@
</child> </child>
</object> </object>
</child> </child>
<child>
<object class="GtkLabel"> </object>
<property name="xalign">0</property> </child>
<property name="label" translatable="yes">Formats</property>
<attributes> <child>
<attribute name="weight" value="bold"/> <object class="AdwPreferencesGroup">
</attributes> <property name="title" translatable="yes">Formats</property>
</object> <property name="description" translatable="yes">The format used for numbers, dates, and currencies.</property>
</child>
<child>
<object class="GtkLabel">
<property name="xalign">0</property>
<property name="label" translatable="yes">The format used for numbers, dates, and currencies.</property>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<child> <child>
<object class="GtkListBox" id="formats_list"> <object class="GtkListBox" id="formats_list">
<property name="selection-mode">none</property> <property name="selection-mode">none</property>
@ -215,6 +191,7 @@
</child> </child>
</object> </object>
</child> </child>
<child> <child>
<object class="GtkLabel" id="login_label"> <object class="GtkLabel" id="login_label">
<property name="visible">False</property> <property name="visible">False</property>