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