Unity 8
TutorialTop.qml
1 /*
2  * Copyright (C) 2015-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.4
18 import Ubuntu.Components 1.3
19 import "." as LocalComponents
20 
21 TutorialPage {
22  id: root
23 
24  property var panel
25 
26  opacityOverride: 1 - panel.indicators.unitProgress
27 
28  QtObject {
29  id: d
30  readonly property bool landscape: root.width > units.gu(50)
31  readonly property real columnWidth: landscape ? panel.indicators.width : root.width
32  }
33 
34  mouseArea {
35  anchors.topMargin: panel.indicators.minimizedPanelHeight
36  }
37 
38  background {
39  sourceSize.height: 1916
40  sourceSize.width: 1080
41  source: Qt.resolvedUrl("graphics/background2.png")
42  }
43 
44  arrow {
45  anchors.top: root.top
46  anchors.topMargin: units.gu(4)
47  anchors.horizontalCenter: root.right
48  anchors.horizontalCenterOffset: - d.columnWidth / 2
49  rotation: -90
50  }
51 
52  label {
53  text: i18n.tr("Swipe from the top edge to access notifications and quick settings")
54  anchors.top: arrow.bottom
55  anchors.topMargin: units.gu(3)
56  anchors.horizontalCenter: arrow.horizontalCenter
57  anchors.horizontalCenterOffset: (label.width - label.contentWidth) / 2
58  width: d.columnWidth - units.gu(8)
59  }
60 }