-
Notifications
You must be signed in to change notification settings - Fork 1
/
RotateScreen.qml
77 lines (59 loc) · 1.26 KB
/
RotateScreen.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import QtQuick 2.9
import QtQuick.Window 2.2
//import QtQuick.Controls 1.3
//import QtQuick.Controls.Styles 1.3
//import Ubuntu.Components 1.2
import "main.js" as Scripts
Item {
id:popup
property string number: "0"
property string list:""
clip: true
states: [
State {
name:"Active"
PropertyChanges {
target: popup
z: 3
}
},
State {
name:"InActive"
PropertyChanges {
target: popup
z: -2
}
},
State {
name:"need_rotate"
PropertyChanges {
target:popup
z: 3
}
when:layouts.width < units.gu(mobile_vert) && popup.state == "Active"
},
State {
name:"rotated"
PropertyChanges {
target:popup
z: -2
}
when:layouts.width > units.gu(mobile_vert) && popup.state == "Active"
}
]
anchors.centerIn: parent
width:parent.width
height:parent.height
Rectangle {
anchors.fill:parent
color:Qt.rgba(0.1,0.1,0.1,0.8)
}
Text {
text:"Rotate Screen"
anchors.centerIn: parent
color:"white"
}
MouseArea {
anchors.fill:parent
}
}