2
* Copyright (C) 2016 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import "../../../../qml/Components"
19
import Ubuntu.Components 1.3
20
import Ubuntu.Gestures 0.1
29
property real hintDisplacement
35
value: root.parent.width - root.width
51
signal dragHandleRecognizedGesture(var dragHandle)
53
property string animatedProp: stretch ? "width" : "x"
54
property real propValueWhenShown: stretch ? parent.width : 0
55
property real propValueWhenHidden: stretch ? 0 : parent.width
57
showAnimation: StandardAnimation { property: animatedProp; to: propValueWhenShown }
58
hideAnimation: StandardAnimation { property: animatedProp; to: propValueWhenHidden }
60
Image { source: "../../UnityLogo.png"; anchors.fill: parent }
63
objectName: "rightEdgeHideDragHandle"
65
anchors.top: parent.top
66
anchors.bottom: parent.bottom
67
anchors.left: parent.left
71
direction: Direction.Rightwards
73
maxTotalDragDistance: root.parent.width
74
hintDisplacement: root.hintDisplacement
78
dragHandleRecognizedGesture(hideDragHandle);
82
Rectangle { color: "red"; anchors.fill: parent }
86
objectName: "rightEdgeShowDragHandle"
88
anchors.top: parent.top
89
anchors.bottom: parent.bottom
90
anchors.right: parent.left
94
direction: Direction.Leftwards
96
maxTotalDragDistance: root.parent.width
97
hintDisplacement: root.hintDisplacement
101
dragHandleRecognizedGesture(showDragHandle);
105
Rectangle { color: "green"; anchors.fill: parent }