user-controls: Remove AdwPreferencesPage

AdwPreferencesPage is intended to be used as the first widget
inside page. It has an AdwClamp and a scrolled window to handle
just that.

Putting it in the MctUserControls widget is undesired, because
it introduces an oddly positioned scrolled window in the parental
controls page of Initial Setup, and if we ever reintroduce this
widgetry in Settings, it would suffer from the same problem.

Remove AdwPreferencesPage from MctUserControls, and replace it
with a vertical box. Add an AdwPreferencesPage in malcontent-controls
to compensate for that.
This commit is contained in:
Georges Basile Stavracas Neto 2022-07-16 09:54:37 -03:00
parent 9a35a09e24
commit fe785d357d
2 changed files with 17 additions and 7 deletions

View File

@ -4,7 +4,9 @@
<requires lib="gtk+" version="3.12"/> <requires lib="gtk+" version="3.12"/>
<template class="MctUserControls" parent="AdwBin"> <template class="MctUserControls" parent="AdwBin">
<child> <child>
<object class="AdwPreferencesPage"> <object class="GtkBox">
<property name="spacing">24</property>
<property name="orientation">vertical</property>
<child> <child>
<object class="AdwPreferencesGroup"> <object class="AdwPreferencesGroup">
<child> <child>

View File

@ -58,12 +58,20 @@
</object> </object>
</child> </child>
<child> <child>
<object class="MctUserControls" id="user_controls"> <object class="AdwPreferencesPage">
<!-- Content is set in code; this string is just a placeholder --> <child>
<property name="description">Its recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider.</property> <object class="AdwPreferencesGroup">
<property name="height-request">270</property> <child>
<property name="dbus-connection">dbus_connection</property> <object class="MctUserControls" id="user_controls">
<property name="vexpand">True</property> <!-- Content is set in code; this string is just a placeholder -->
<property name="description">Its recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider.</property>
<property name="height-request">270</property>
<property name="dbus-connection">dbus_connection</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>