forked from garyjohnson/ci_screen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.qml
More file actions
executable file
·34 lines (26 loc) · 804 Bytes
/
main.qml
File metadata and controls
executable file
·34 lines (26 loc) · 804 Bytes
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
import QtQuick 2.2
import QtQuick.Window 2.1
Loader {
id: root
property int parentHeight
property int parentWidth
//x: parentWidth / 2 - width / 2
//y: parentHeight / 2 - height / 2
anchors.centerIn: parent
parentHeight: parent == null ? 0 : parent.height
parentWidth: parent == null ? 0 : parent.width
height: screenRotation % 180 == 0 ? parentHeight : parentWidth
width: screenRotation % 180 == 0 ? parentWidth : parentHeight
source: 'screens/status_screen.qml'
transform: Rotation {
angle: screenRotation
origin.x: root.width / 2
origin.y: root.height / 2
}
FontLoader {
source: 'assets/open-sans/OpenSans-Regular.ttf'
}
FontLoader {
source: 'assets/open-sans/OpenSans-Bold.ttf'
}
}