[gnome-control-center] keyboard: Adjust input chooser widgetry



commit 4ccf6e670bbea40fec03d1cb7fbab73ef6d543f6
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Feb 12 18:07:33 2022 -0800

    keyboard: Adjust input chooser widgetry
    
    Adjusts the widgetry of the input chooser to clamp
    the list and add a separator between the search bar
    and the list.
    
    The list's shadow is no longer clipped, and keyboard
    navigation now scrolls.

 panels/keyboard/cc-input-chooser.ui | 45 ++++++++++++++++++++++++-------------
 1 file changed, 29 insertions(+), 16 deletions(-)
---
diff --git a/panels/keyboard/cc-input-chooser.ui b/panels/keyboard/cc-input-chooser.ui
index ce6485e7a..3bb8ddcae 100644
--- a/panels/keyboard/cc-input-chooser.ui
+++ b/panels/keyboard/cc-input-chooser.ui
@@ -27,27 +27,40 @@
         <property name="spacing">0</property>
         <child>
           <object class="GtkScrolledWindow">
+            <property name="vexpand">True</property>
             <property name="hscrollbar-policy">never</property>
-            <property name="vscrollbar-policy">automatic</property>
             <property name="propagate-natural-height">True</property>
-            <property name="margin-start">6</property>
-            <property name="margin-end">6</property>
-            <property name="margin-top">6</property>
-            <property name="margin-bottom">6</property>
             <property name="min-content-height">300</property>
             <property name="vadjustment">scroll_adjustment</property>
-            <child>
-              <object class="GtkListBox" id="input_sources_listbox">
-                <property name="vexpand">True</property>
-                <property name="halign">fill</property>
-                <property name="valign">fill</property>
-                <signal name="row-activated" handler="on_input_sources_listbox_row_activated_cb" 
object="CcInputChooser" swapped="yes" />
-                <signal name="selected-rows-changed" 
handler="on_input_sources_listbox_selected_rows_changed_cb" object="CcInputChooser" swapped="yes" />
-                <style>
-                  <class name="boxed-list" />
-                </style>
+            <property name="child">
+              <object class="GtkViewport">
+                <property name="scroll-to-focus">True</property>
+                <property name="child">
+                  <object class="AdwClamp">
+                    <property name="child">
+                      <object class="GtkListBox" id="input_sources_listbox">
+                        <property name="halign">fill</property>
+                        <property name="valign">start</property>
+                        <property name="margin-top">24</property>
+                        <property name="margin-bottom">24</property>
+                        <property name="margin-start">12</property>
+                        <property name="margin-end">12</property>
+                        <signal name="row-activated" handler="on_input_sources_listbox_row_activated_cb" 
object="CcInputChooser" swapped="yes" />
+                        <signal name="selected-rows-changed" 
handler="on_input_sources_listbox_selected_rows_changed_cb" object="CcInputChooser" swapped="yes" />
+                        <style>
+                          <class name="boxed-list" />
+                        </style>
+                      </object>
+                    </property>
+                  </object>
+                </property>
               </object>
-            </child>
+            </property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible" bind-source="filter_entry" bind-property="visible" 
bind-flags="sync-create"/>
           </object>
         </child>
         <child>


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