[gnome-games/wip/exalm/platform-preferences: 80/80] wip



commit f9b38a9a39654679445fe41824481ed14f872033
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 11 01:29:07 2018 +0500

    wip

 src/ui/preferences-window.vala | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/src/ui/preferences-window.vala b/src/ui/preferences-window.vala
index 28d4e16e..b3f9a724 100644
--- a/src/ui/preferences-window.vala
+++ b/src/ui/preferences-window.vala
@@ -7,12 +7,8 @@ private class Games.PreferencesWindow : Gtk.Window {
        [GtkChild]
        private Gtk.HeaderBar left_header_bar;
        [GtkChild]
-       private Gtk.Separator header_separator;
-       [GtkChild]
        private Gtk.Box sidebar_vbox;
        [GtkChild]
-       private Gtk.Separator separator;
-       [GtkChild]
        private Gtk.Stack stack;
 
        private Gtk.HeaderBar _right_header_bar;
@@ -33,12 +29,19 @@ private class Games.PreferencesWindow : Gtk.Window {
        public bool immersive_mode {
                get { return _immersive_mode; }
                set {
-                       header_separator.visible = !value;
-                       left_header_bar.visible = !value;
-                       separator.visible = !value;
-                       sidebar_vbox.visible = !value;
-                       if (right_header_bar != null)
+                       if (value)
+                               left_header_bar.get_style_context ().add_class ("selection-mode");
+                       else
+                               left_header_bar.get_style_context ().remove_class ("selection-mode");
+
+                       sidebar_vbox.sensitive = !value;
+                       if (right_header_bar != null) {
                                right_header_bar.show_close_button = !value;
+                               if (value)
+                                       right_header_bar.get_style_context ().add_class ("selection-mode");
+                               else
+                                       right_header_bar.get_style_context ().remove_class ("selection-mode");
+                       }
 
                        _immersive_mode = value;
                }


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