Dekko
Loading...
Searching...
No Matches
SettingsStage.qml
1/* Copyright (C) 2016 - 2017 Dan Chapman <dpniel@ubuntu.com>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18import QtQuick 2.4
19import QuickFlux 1.0
20import Lomiri.Components 1.3
21import Dekko.Components 1.0
22import Dekko.Mail.API 1.0
23import Dekko.Mail.Stores.Settings 1.0
24import Dekko.Lomiri.Components 1.0
25import "../settings"
26import Dekko.Lomiri.Constants 1.0
27import Dekko.Lomiri.Stage 1.0
28import Dekko.Lomiri.Helpers 1.0
29
30BaseStage {
31 id: settingsStage
32 property alias viewState: vs
33
34 ViewState {
35 id: vs
36 anchors.fill: parent
37 Component.onCompleted: SettingsStore.viewState = vs
38 }
39
40 StretchRow {
41 spacing: 0
42 anchors.fill: parent
43 // Should only be visible on large FF
44 // Access is done via the navigation drawer
45 // for smaller FF's
46 PanelContainer {
47 stretchOnSmallFF: true
48 viewState: vs
49 resizable: !vs.isSmallFF
50 minSize: units.gu(30)
51 maxSize: units.gu(50)
52 size: units.gu(40)
53 height: parent.height
54 activeEdge: Item.Right
55 StageArea {
56 id: navMenuStage
57 stageID: ViewKeys.settingsStack1
58 anchors.fill: parent
59 baseUrl: Qt.resolvedUrl("../settings/Settings.qml")
60 }
61 }
62 // Take rest of space when visible
63 Stretcher {
64 visible: !vs.isSmallFF
65 anchors {
66 top: parent.top
67 bottom: parent.bottom
68 }
69 StageArea {
70 id: msgViewStage
71 stageID: ViewKeys.settingsStack2
72 anchors.fill: parent
73 immediatePush: false
74 pushBeforeReplace: true
75 baseComponent: Component {
76 Item {
77 height: parent.height
78 width: parent.width
79 }
80 }
81 delegate: DekkoAnimation.customStackViewDelegate1
82 }
83 }
84 }
85}
86