[gnome-games/wip/exalm/mobile: 11/15] ui: Introduce AdaptiveState



commit f17897062d242b037fbf857689ba7fca91fe0a49
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue May 28 22:40:43 2019 +0500

    ui: Introduce AdaptiveState
    
    This will be used in the next commits to hold adaptive UI state, namely
    whether to use bottom HdyViewSwitcherBar, whether leaflet in platforms
    view is folded, whether subview is open and the title of the subview.

 src/meson.build            |  1 +
 src/ui/adaptive-state.vala | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
---
diff --git a/src/meson.build b/src/meson.build
index e679c6d7..ed9c2929 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -128,6 +128,7 @@ vala_sources = [
   'tracker/tracker-uri-query.vala',
   'tracker/tracker-uri-source.vala',
 
+  'ui/adaptive-state.vala',
   'ui/application.vala',
   'ui/application-window.vala',
   'ui/checkmark-item.vala',
diff --git a/src/ui/adaptive-state.vala b/src/ui/adaptive-state.vala
new file mode 100644
index 00000000..2f8fbc4e
--- /dev/null
+++ b/src/ui/adaptive-state.vala
@@ -0,0 +1,15 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+public class Games.AdaptiveState : Object {
+       public bool is_showing_bottom_bar { get; set; }
+       public bool is_folded { get; set; }
+       public bool is_subview_open { get; set; }
+       public string subview_title { get; set; }
+
+       construct {
+               is_showing_bottom_bar = false;
+               is_folded = false;
+               is_subview_open = false;
+               subview_title = "";
+       }
+}


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