Unity 8
TutorialLeftLong.qml
1 /*
2  * Copyright (C) 2016 Canonical, Ltd.
3  *
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.
7  *
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.
12  *
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/>.
15  */
16 
17 import QtQuick 2.12
18 import Ubuntu.Components 1.3
19 import "." as LocalComponents
20 
21 TutorialPage {
22  id: root
23 
24  property var launcher
25 
26  // Unlike other tutorials, this one can't be skipped before we show it, so
27  // only set opacityOverride if we're already shown.
28  opacityOverride: shown ? 1 - launcher.dragDistance / (launcher.panelWidth * 3) : 1
29 
30  mouseArea {
31  anchors.leftMargin: root.launcher.dragAreaWidth
32  }
33 
34  background {
35  sourceSize.height: 1916
36  sourceSize.width: 1080
37  source: Qt.resolvedUrl("graphics/background1.png")
38  mirror: true
39  }
40 
41  arrow {
42  anchors.left: root.left
43  anchors.leftMargin: units.gu(2)
44  anchors.verticalCenter: root.verticalCenter
45  rotation: 180
46  }
47 
48  label {
49  text: i18n.tr("Long swipe from the left edge to open the Application Drawer")
50  anchors.left: arrow.right
51  anchors.leftMargin: units.gu(3)
52  anchors.right: root.right
53  anchors.rightMargin: units.gu(4)
54  anchors.verticalCenter: arrow.verticalCenter
55  }
56 }