2 * Copyright (C) 2014,2015 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 1.3
19 import "." as LocalComponents
26 title: i18n.tr("Open the launcher")
27 text: i18n.tr("Short swipe from the left edge.")
29 textXOffset: root.launcher.x + root.launcher.visibleWidth
35 if (root.launcher.state === "visible") {
49 objectName: "teaseAnimation"
50 paused: running && root.paused
51 running: !slider.active && root.launcher.visibleWidth === 0 && root.shown
52 loops: Animation.Infinite
53 property real bounce: 0
54 readonly property real maxBounce: units.gu(2)
56 UbuntuNumberAnimation {
57 target: teaseAnimation
59 to: teaseAnimation.maxBounce
60 duration: UbuntuAnimation.SleepyDuration
62 UbuntuNumberAnimation {
63 target: teaseAnimation
66 duration: UbuntuAnimation.SleepyDuration
74 value: Math.min(root.launcher.panelWidth - root.launcher.visibleWidth, teaseAnimation.bounce)
82 root.launcher.x = 0; // make sure to reset launcher before we go
88 LocalComponents.Slider {
93 topMargin: root.textBottom + units.gu(3)
95 offset: root.launcher.x + root.launcher.visibleWidth + root.launcher.progress
96 active: root.launcher.dragging