forked from papyros/qml-material
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPageSidebar.qml
More file actions
49 lines (38 loc) · 1.09 KB
/
Copy pathPageSidebar.qml
File metadata and controls
49 lines (38 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* QML Material - An application framework implementing Material Design.
*
* Copyright (C) 2015-2016 Michael Spencer <sonrisesoftware@gmail.com>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import QtQuick 2.4
import QtQuick.Controls 1.3 as Controls
import Material 0.3
/*!
\qmltype PageSidebar
\inqmlmodule Material
\brief Represents a split sidebar in a page, with its own title, actions, and color
in the action bar.
*/
Page {
id: pageSidebar
default property alias sidebar: sidebar.data
property alias mode: sidebar.mode
property bool showing: true
anchors {
rightMargin: showing ? 0 : -width
Behavior on rightMargin {
id: behavior
enabled: false
NumberAnimation { duration: 200 }
}
}
height: parent.height
Sidebar {
id: sidebar
anchors.fill: parent
}
Component.onCompleted: behavior.enabled = true
}