[gnome-games/wip/exalm/libhandy2: 9/28] ui: Remove unnecessary box from preferences window



commit 7966f54cefc5b5fe42d41cce33d8fdc92728327f
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Wed Sep 12 20:00:36 2018 +0500

    ui: Remove unnecessary box from preferences window

 data/ui/preferences-window.ui  | 22 ++++++++--------------
 src/ui/preferences-window.vala |  4 ++--
 2 files changed, 10 insertions(+), 16 deletions(-)
---
diff --git a/data/ui/preferences-window.ui b/data/ui/preferences-window.ui
index 4886df38..05a71cbf 100644
--- a/data/ui/preferences-window.ui
+++ b/data/ui/preferences-window.ui
@@ -31,21 +31,15 @@
       <object class="GtkBox" id="content_box">
         <property name="visible">True</property>
         <child>
-          <object class="GtkBox" id="sidebar_vbox">
-            <property name="orientation">vertical</property>
+          <object class="GtkStackSidebar" id="sidebar">
+            <property name="margin-top">4</property>
+            <property name="stack">stack</property>
+            <property name="vexpand">True</property>
             <property name="visible">True</property>
-            <child>
-              <object class="GtkStackSidebar" id="sidebar">
-                <property name="margin-top">4</property>
-                <property name="stack">stack</property>
-                <property name="vexpand">True</property>
-                <property name="visible">True</property>
-                <property name="width-request">150</property>
-                <style>
-                  <class name="preferences" />
-                </style>
-              </object>
-            </child>
+            <property name="width-request">150</property>
+            <style>
+              <class name="preferences" />
+            </style>
           </object>
         </child>
         <child>
diff --git a/src/ui/preferences-window.vala b/src/ui/preferences-window.vala
index 28d4e16e..6a89c1e2 100644
--- a/src/ui/preferences-window.vala
+++ b/src/ui/preferences-window.vala
@@ -9,7 +9,7 @@ private class Games.PreferencesWindow : Gtk.Window {
        [GtkChild]
        private Gtk.Separator header_separator;
        [GtkChild]
-       private Gtk.Box sidebar_vbox;
+       private Gtk.StackSidebar sidebar;
        [GtkChild]
        private Gtk.Separator separator;
        [GtkChild]
@@ -36,7 +36,7 @@ private class Games.PreferencesWindow : Gtk.Window {
                        header_separator.visible = !value;
                        left_header_bar.visible = !value;
                        separator.visible = !value;
-                       sidebar_vbox.visible = !value;
+                       sidebar.visible = !value;
                        if (right_header_bar != null)
                                right_header_bar.show_close_button = !value;
 


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