2
* Copyright (C) 2013 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 Ubuntu.Components 0.1
19
import "../../../Components"
22
id: revealingRectangle
24
property int orientation: Qt.Vertical
25
property int direction: Qt.LeftToRight
26
property Revealer revealer: __revealer
27
property Showable showable: __showable
35
x: orientation == Qt.Vertical ? 0 : direction == Qt.LeftToRight ? 0 : parent.width - width
36
y: orientation == Qt.Horizontal ? 0 : direction == Qt.LeftToRight ? 0 : parent.height - height
37
handleSize: orientation == Qt.Vertical ? handle.height : handle.width
38
hintDisplacement: handleSize
39
orientation: revealingRectangle.orientation
40
direction: revealingRectangle.direction
46
width: orientation == Qt.Horizontal ? units.gu(24) : parent.width
47
height: orientation == Qt.Vertical ? units.gu(24) : parent.height
50
showAnimation: SmoothedAnimation {
51
property: orientation == Qt.Horizontal ? "x" : "y"
52
velocity: __revealer.dragVelocity
54
to: __revealer.openedValue
56
hideAnimation: SmoothedAnimation {
57
property: orientation == Qt.Horizontal ? "x" : "y"
58
velocity: __revealer.dragVelocity
60
to: __revealer.closedValue
71
x: orientation == Qt.Vertical ? 0 : direction == Qt.LeftToRight ? parent.width - width : 0
72
y: orientation == Qt.Horizontal ? 0 : direction == Qt.LeftToRight ? parent.height - height : 0
73
width: orientation == Qt.Horizontal ? units.gu(2) : parent.width
74
height: orientation == Qt.Vertical ? units.gu(2) : parent.height