2 * Copyright (C) 2015-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 Ubuntu.Components 1.3
24 property string usageScenario
26 // When on phone or tablet, fade out as the drag progresses
27 opacityOverride: usageScenario === "desktop" ? 1 : 1 - stage.dragProgress * 2
29 // Else on desktop, fade out when the spread is shown
31 target: usageScenario === "desktop" ? stage : null
32 ignoreUnknownSignals: true
33 onSpreadShownChanged: if (stage.spreadShown && root.shown) root.hide()
37 anchors.rightMargin: stage.dragAreaWidth
41 sourceSize.height: 1916
42 sourceSize.width: 1080
43 source: Qt.resolvedUrl("graphics/background1.png")
47 anchors.right: root.right
48 anchors.rightMargin: units.gu(2)
49 anchors.verticalCenter: root.verticalCenter
50 rotation: usageScenario === "desktop" ? 180 : 0
54 text: root.usageScenario === "desktop" ?
55 i18n.tr("Push your mouse against the right edge to view your open apps") :
56 i18n.tr("Swipe from the right edge to view your open apps")
57 anchors.right: arrow.left
58 anchors.rightMargin: units.gu(2) - (label.width - label.contentWidth)
59 anchors.verticalCenter: arrow.verticalCenter
60 width: Math.min(units.gu(40), arrow.x - units.gu(4))