@@ -17,53 +17,87 @@
17import QtQuick 2.4
17import QtQuick 2.4
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19import Ubuntu.Components 1.3
19import Ubuntu.Components 1.3
20+import QtQuick.Window 2.2
20import "Components"
21import "Components"
25 property bool infoNoteDisplayed: true
27 property bool infoNoteDisplayed: true
29+ property int physicalOrientation: Screen.orientation
27 WallpaperResolver {
31 WallpaperResolver {
28 width: root.width
32 width: root.width
29 id: wallpaperResolver
33 id: wallpaperResolver
32− source: wallpaperResolver.background
36+ Item {
33−
37+ id: contentContainer
36− anchors.fill: parent
38+ anchors.centerIn: parent
37− }
39+ height: rotationAngle == 90 || rotationAngle == 270 ? parent.width : parent.height
40+ width: rotationAngle == 90 || rotationAngle == 270 ? parent.height : parent.width
39− MouseArea {
42+ property int rotationAngle: {
40− objectName: "infoNoticeMouseArea"
43+ print("changed something", Screen.orientation)
44+ switch (Screen.orientation) {
45+ case Qt.PortraitOrientation:
47+ case Qt.LandscapeOrientation:
49+ case Qt.InvertedPortraitOrientation:
51+ case Qt.InvertedLandscapeOrientation:
56+ transform: Rotation {
57+ origin.x: contentContainer.width / 2
58+ origin.y: contentContainer.height / 2; axis { x: 0; y: 0; z: 1 }
59+ angle: contentContainer.rotationAngle
41− anchors.fill: parent
63+ anchors.fill: parent
42− opacity: infoNoteDisplayed ? 1 : 0
45− Behavior on opacity {
46− UbuntuNumberAnimation { }
49− onClicked: root.infoNoteDisplayed = false;
66+ Image {
52 anchors.fill: parent
67 anchors.fill: parent
53− color: "black"
68+ source: wallpaperResolver.background
72+ objectName: "infoNoticeMouseArea"
74+ opacity: infoNoteDisplayed ? 1 : 0
77+ Behavior on opacity {
78+ UbuntuNumberAnimation { }
81+ onClicked: root.infoNoteDisplayed = false;
59− anchors.centerIn: parent
91+ anchors.centerIn: parent
60− width: parent.width - units.gu(8)
92+ width: parent.width - units.gu(8)
61− text: i18n.tr("Your device is now connected to an external display. Use this screen as a touch pad to interact with the mouse.")
93+ text: i18n.tr("Your device is now connected to an external display. Use this screen as a touch pad to interact with the mouse.")
62− color: "white"
94+ color: "white"
63− horizontalAlignment: Text.AlignHCenter
95+ horizontalAlignment: Text.AlignHCenter
64− verticalAlignment: Text.AlignVCenter
96+ verticalAlignment: Text.AlignVCenter
65− fontSize: "x-large"
97+ fontSize: "x-large"
66− wrapMode: Text.Wrap
98+ wrapMode: Text.Wrap