user-controls: Use HdyPreferencesPage and HdyActionRow API
This allows us to get styling consistent with HdyPreferencesWindow and similar content across GNOME. Part of a consistency push for GNOME 40
This commit is contained in:
parent
d80ed10592
commit
358cad3a24
6 changed files with 216 additions and 556 deletions
|
@ -214,7 +214,6 @@ mct_application_activate (GApplication *application)
|
|||
self->error_message = GTK_LABEL (gtk_builder_get_object (builder, "error_message"));
|
||||
self->lock_button = GTK_LOCK_BUTTON (gtk_builder_get_object (builder, "lock_button"));
|
||||
self->user_accounts_panel_button = GTK_BUTTON (gtk_builder_get_object (builder, "user_accounts_panel_button"));
|
||||
self->help_label = GTK_LABEL (gtk_builder_get_object (builder, "help_label"));
|
||||
|
||||
/* Connect signals. */
|
||||
g_signal_connect_object (self->user_selector, "notify::user",
|
||||
|
@ -413,7 +412,7 @@ update_main_stack (MctApplication *self)
|
|||
"with %s. <a href='https://www.commonsensemedia.org/privacy-and-internet-safety'>"
|
||||
"Read guidance</a> on what to consider."),
|
||||
act_user_get_real_name (selected_user));
|
||||
gtk_label_set_markup (self->help_label, help_label);
|
||||
mct_user_controls_set_description (self->user_controls, help_label);
|
||||
|
||||
mct_user_controls_set_user (self->user_controls, selected_user);
|
||||
|
||||
|
|
|
@ -56,40 +56,12 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<object class="MctUserControls" id="user_controls">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-height">370</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">18</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">18</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="help_label">
|
||||
<!-- Content is set in code; this string is just a placeholder -->
|
||||
<property name="label">It’s recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider.</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<property name="yalign">0.0</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject">
|
||||
<property name="AtkObject::accessible-role">static</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="MctUserControls" id="user_controls">
|
||||
<property name="halign">center</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="dbus-connection">dbus_connection</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<!-- Content is set in code; this string is just a placeholder -->
|
||||
<property name="description">It’s 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>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue