[gnome-control-center/gbsneto/user-panel-cleanups: 1/3] users: Cleanup and modernize CcLoginHistoryDialog




commit 998db79732cfeffb705be772877fab878b6c81cd
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Feb 8 10:53:55 2022 -0300

    users: Cleanup and modernize CcLoginHistoryDialog
    
     - Remove all 'can-focus' properties, rely on GTK defaults
     - Use AdwPreferencesPage internally
     - Make dialog resizable
     - Set 'icon-name' in header buttons instead of a GtkImage

 panels/user-accounts/cc-login-history-dialog.ui | 60 +++++--------------------
 1 file changed, 10 insertions(+), 50 deletions(-)
---
diff --git a/panels/user-accounts/cc-login-history-dialog.ui b/panels/user-accounts/cc-login-history-dialog.ui
index e05e4f445..3d4b4c986 100644
--- a/panels/user-accounts/cc-login-history-dialog.ui
+++ b/panels/user-accounts/cc-login-history-dialog.ui
@@ -1,58 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 3.8 -->
   <template class="CcLoginHistoryDialog" parent="GtkDialog">
-    <property name="can_focus">False</property>
-    <property name="resizable">False</property>
+    <property name="default-width">400</property>
+    <property name="default-height">400</property>
     <property name="modal">True</property>
     <property name="icon_name">system-users</property>
     <child internal-child="headerbar">
       <object class="GtkHeaderBar" id="header_bar">
-        <property name="can_focus">False</property>
         <child type="title">
           <object class="GtkLabel" id="title_label">
           </object>
         </child>
         <child>
           <object class="GtkBox">
-            <property name="can_focus">True</property>
             <style>
               <class name="linked"/>
             </style>
             <child>
               <object class="GtkButton" id="previous_button">
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
+                <property name="icon_name">go-previous-symbolic</property>
                 <property name="valign">center</property>
                 <signal name="clicked" handler="previous_button_clicked_cb" object="CcLoginHistoryDialog" 
swapped="yes"/>
-                <style>
-                  <class name="image-button"/>
-                </style>
-                <child>
-                  <object class="GtkImage">
-                    <property name="can_focus">False</property>
-                    <property name="icon_name">go-previous-symbolic</property>
-                    <property name="pixel_size">16</property>
-                  </object>
-                </child>
               </object>
             </child>
             <child>
               <object class="GtkButton" id="next_button">
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
+                <property name="icon_name">go-next-symbolic</property>
                 <property name="valign">center</property>
                 <signal name="clicked" handler="next_button_clicked_cb" object="CcLoginHistoryDialog" 
swapped="yes"/>
-                <style>
-                  <class name="image-button"/>
-                </style>
-                <child>
-                  <object class="GtkImage">
-                    <property name="can_focus">False</property>
-                    <property name="icon_name">go-next-symbolic</property>
-                    <property name="pixel_size">16</property>
-                  </object>
-                </child>
               </object>
             </child>
           </object>
@@ -60,30 +35,15 @@
       </object>
     </child>
     <child>
-      <object class="GtkBox">
-        <property name="can_focus">False</property>
-        <property name="orientation">vertical</property>
+      <object class="AdwPreferencesPage">
         <child>
-          <object class="GtkBox">
-            <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
+          <object class="AdwPreferencesGroup">
             <child>
-              <object class="GtkScrolledWindow">
-                <property name="width_request">350</property>
-                <property name="height_request">300</property>
-                <property name="can_focus">True</property>
+              <object class="GtkListBox" id="history_box">
                 <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <property name="hscrollbar_policy">never</property>
-                <child>
-                  <object class="GtkListBox" id="history_box">
-                    <property name="can_focus">False</property>
-                    <property name="hexpand">True</property>
-                    <style>
-                      <class name="content"/>
-                    </style>
-                  </object>
-                </child>
+                <style>
+                  <class name="boxed-list" />
+                </style>
               </object>
             </child>
           </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]