diff options
Diffstat (limited to 'prototype_2016/third_party/qml-material/src/window/NavigationDrawer.qml')
-rw-r--r-- | prototype_2016/third_party/qml-material/src/window/NavigationDrawer.qml | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/prototype_2016/third_party/qml-material/src/window/NavigationDrawer.qml b/prototype_2016/third_party/qml-material/src/window/NavigationDrawer.qml deleted file mode 100644 index 39a9545..0000000 --- a/prototype_2016/third_party/qml-material/src/window/NavigationDrawer.qml +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* | ||
2 | * QML Material - An application framework implementing Material Design. | ||
3 | * | ||
4 | * Copyright (C) 2014-2016 Michael Spencer <sonrisesoftware@gmail.com> | ||
5 | * 2015 Pierre Jacquier <pierrejacquier39@gmail.com> | ||
6 | * | ||
7 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
8 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
9 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
10 | */ | ||
11 | |||
12 | import QtQuick 2.4 | ||
13 | import Material 0.3 | ||
14 | |||
15 | /*! | ||
16 | \qmltype NavigationDrawer | ||
17 | \inqmlmodule Material | ||
18 | |||
19 | \brief The navigation drawer slides in from the left and is a common pattern in apps. | ||
20 | */ | ||
21 | PopupBase { | ||
22 | id: navDrawer | ||
23 | objectName: "navDrawer" | ||
24 | |||
25 | overlayLayer: "dialogOverlayLayer" | ||
26 | overlayColor: Qt.rgba(0, 0, 0, 0.3) | ||
27 | |||
28 | width: Math.min(parent.width - 1 * Device.gridUnit * Units.dp, 5 * Device.gridUnit * Units.dp) | ||
29 | |||
30 | anchors { | ||
31 | left: mode === "left" ? parent.left : undefined | ||
32 | right: mode === "right" ? parent.right : undefined | ||
33 | top: parent.top | ||
34 | bottom: parent.bottom | ||
35 | |||
36 | leftMargin: showing ? 0 : -width - 10 * Units.dp | ||
37 | rightMargin: showing ? 0 : -width - 10 * Units.dp | ||
38 | |||
39 | Behavior on leftMargin { | ||
40 | NumberAnimation { duration: 200 } | ||
41 | } | ||
42 | Behavior on rightMargin { | ||
43 | NumberAnimation { duration: 200 } | ||
44 | } | ||
45 | } | ||
46 | |||
47 | property string mode: "left" // or "right" | ||
48 | |||
49 | property alias enabled: action.visible | ||
50 | |||
51 | readonly property Action action: action | ||
52 | |||
53 | onEnabledChanged: { | ||
54 | if (!enabled) | ||
55 | close() | ||
56 | } | ||
57 | |||
58 | Action { | ||
59 | id: action | ||
60 | iconName: "navigation/menu" | ||
61 | name: "Navigation Drawer" | ||
62 | onTriggered: navDrawer.toggle() | ||
63 | } | ||
64 | |||
65 | View { | ||
66 | anchors.fill: parent | ||
67 | fullHeight: true | ||
68 | elevation: 3 | ||
69 | backgroundColor: "white" | ||
70 | } | ||
71 | } | ||