[dconf-editor] Improve OverlayedList keyboard navigation.



commit 858a1eb7a9ed5feb2e21577f04a350a3d39bd744
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Nov 28 20:44:35 2018 +0100

    Improve OverlayedList keyboard navigation.

 editor/overlayed-list.vala | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/editor/overlayed-list.vala b/editor/overlayed-list.vala
index 7ac712c..c95a615 100644
--- a/editor/overlayed-list.vala
+++ b/editor/overlayed-list.vala
@@ -127,7 +127,10 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
             row = main_list_box.get_row_at_index (((!) row).get_index () + 1);
 
         if (row == null)
+        {
+            _scroll_bottom (ref main_list_box);
             return;
+        }
         main_list_box.select_row ((!) row);
         ((!) row).grab_focus ();
     }
@@ -197,12 +200,20 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
     }
 
     protected void scroll_top ()
+    {
+        _scroll_top (ref main_list_box);
+    }
+    private static inline void _scroll_top (ref ListBox main_list_box)
     {
         Adjustment adjustment = main_list_box.get_adjustment ();
         adjustment.set_value (adjustment.get_lower ());
     }
 
     protected void scroll_bottom ()
+    {
+        _scroll_bottom (ref main_list_box);
+    }
+    private static inline void _scroll_bottom (ref ListBox main_list_box)
     {
         Adjustment adjustment = main_list_box.get_adjustment ();
         adjustment.set_value (adjustment.get_upper ());


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