[gnome-games/wip/exalm/prefs: 4/5] preferences-page-platforms: Migrate to HdyPreferencesGroup



commit 15a7ad9f5869c36a0ae192394b606f6c5d5bf1c4
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue May 12 23:01:32 2020 +0500

    preferences-page-platforms: Migrate to HdyPreferencesGroup

 data/ui/preferences-page-platforms.ui  | 9 ++-------
 src/ui/preferences-page-platforms.vala | 4 ++--
 2 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/preferences-page-platforms.ui b/data/ui/preferences-page-platforms.ui
index b52f576f..c90d7350 100644
--- a/data/ui/preferences-page-platforms.ui
+++ b/data/ui/preferences-page-platforms.ui
@@ -4,13 +4,8 @@
   <template class="GamesPreferencesPagePlatforms" parent="GamesPreferencesPage">
     <property name="visible">True</property>
     <child>
-      <object class="GtkListBox" id="list_box">
-        <property name="selection-mode">none</property>
-        <property name="visible">true</property>
-        <style>
-          <class name="rounded"/>
-          <class name="separators"/>
-        </style>
+      <object class="HdyPreferencesGroup" id="platforms_group">
+        <property name="visible" translatable="yes">True</property>
       </object>
     </child>
   </template>
diff --git a/src/ui/preferences-page-platforms.vala b/src/ui/preferences-page-platforms.vala
index 833780e5..c04a81a9 100644
--- a/src/ui/preferences-page-platforms.vala
+++ b/src/ui/preferences-page-platforms.vala
@@ -3,7 +3,7 @@
 [GtkTemplate (ui = "/org/gnome/Games/ui/preferences-page-platforms.ui")]
 private class Games.PreferencesPagePlatforms : PreferencesPage {
        [GtkChild]
-       private Gtk.ListBox list_box;
+       private Hdy.PreferencesGroup platforms_group;
 
        construct {
                title = _("Platforms");
@@ -15,7 +15,7 @@ private class Games.PreferencesPagePlatforms : PreferencesPage {
                        var row = platform.get_row ();
                        row.show ();
 
-                       list_box.add (row);
+                       platforms_group.add (row);
                }
        }
 }


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