[gnome-builder] libide/gui: set scroll-to-focus for listview



commit 3cd3416abe86e8189ead68c2eae61186dd0f4a25
Author: Christian Hergert <chergert redhat com>
Date:   Thu Sep 15 15:11:39 2022 -0700

    libide/gui: set scroll-to-focus for listview
    
    We still need to change how selections are done so this is less annoying,
    but this should be set nonetheless.

 src/libide/gui/ide-search-popover.ui | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/src/libide/gui/ide-search-popover.ui b/src/libide/gui/ide-search-popover.ui
index a8a9975fa..42dfd3666 100644
--- a/src/libide/gui/ide-search-popover.ui
+++ b/src/libide/gui/ide-search-popover.ui
@@ -33,17 +33,20 @@
             <property name="hscrollbar-policy">never</property>
             <property name="min-content-height">400</property>
             <child>
-              <object class="GtkListView" id="list_view">
-                <signal name="activate" handler="ide_search_popover_activate_cb" swapped="true" 
object="IdeSearchPopover"/>
-                <property name="single-click-activate">True</property>
-                <property name="orientation">vertical</property>
-                <property name="model">
-                  <object class="GtkSingleSelection" id="selection">
-                  </object>
-                </property>
-                <property name="factory">
-                  <object class="GtkBuilderListItemFactory">
-                    <property name="bytes"><![CDATA[
+              <object class="GtkViewport">
+                <property name="scroll-to-focus">true</property>
+                <child>
+                  <object class="GtkListView" id="list_view">
+                    <signal name="activate" handler="ide_search_popover_activate_cb" swapped="true" 
object="IdeSearchPopover"/>
+                    <property name="single-click-activate">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="model">
+                      <object class="GtkSingleSelection" id="selection">
+                      </object>
+                    </property>
+                    <property name="factory">
+                      <object class="GtkBuilderListItemFactory">
+                        <property name="bytes"><![CDATA[
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
 <template class="GtkListItem">
@@ -103,9 +106,11 @@
 </template>
 </interface>
 ]]>
+                        </property>
+                      </object>
                     </property>
                   </object>
-                </property>
+                </child>
               </object>
             </child>
           </object>


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