-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.qml
More file actions
145 lines (125 loc) · 4.04 KB
/
main.qml
File metadata and controls
145 lines (125 loc) · 4.04 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Effects
import PipOS
Window {
id: root
width: 730
height: 600
visible: true
title: qsTr("PIP-OS V7.1.0.8")
color: "black"
Item {
id: sceneRoot
anchors.fill: parent
layer.enabled: true
layer.effect: MultiEffect {
anchors.fill: parent
colorization: 1
colorizationColor: Settings.interfaceColor
blurEnabled: true
blur: 0.05
autoPaddingEnabled: false
// When the main screen is loaded, we can flicker, for effect
NumberAnimation on brightness {
id: flashIn
from: -1
to: 0
easing.type: Easing.OutInElastic
duration: 1500
}
}
Item {
id: contentRoot
anchors.fill: parent
Loader {
id: bootLoader
visible: true
asynchronous: false
width: 730
height: 600
transform: [
Scale {
id: bootLoaderScale
xScale: yScale
yScale: Math.min(
root.width / bootLoader.width,
root.height / bootLoader.height) * Settings.scale
},
Translate {
x: Settings.xOffset
y: Settings.yOffset
}
]
sourceComponent: BootSequence {
appIsReady: appLoader.status === Loader.Ready
bootIsComplete: Settings.skipBoot
onSystemReadyChanged: {
console.log("bootloader ready", systemReady)
if (systemReady) {
appLoader.visible = true
bootLoader.visible = false
bootLoader.active = false
}
}
// onComplete: {
// property bool bootIsComplete: false
// property bool appIsReady: false
// property bool systemReady: bootIsComplete && appIsReady
// }
}
onStatusChanged: {
console.log("bootloader status", status)
if (status === Loader.Ready) {
appLoader.active = true
}
}
}
Loader {
id: appLoader
visible: false
active: false
asynchronous: true
width: 730
height: 600
transform: [
Scale {
id: appLoaderScale
xScale: yScale
yScale: Math.min(
root.width / appLoader.width,
root.height / appLoader.height) * Settings.scale
},
Translate {
x: Settings.xOffset
y: Settings.yOffset
}
]
sourceComponent: MainState {}
}
}
Rectangle {
id: scanlines
anchors.fill: parent
opacity: 0.1
color: "black"
visible: Settings.scanLines
Column {
spacing: 2
Repeater {
model: 200
Rectangle {
width: scanlines.width
height: 2
color: "black"
}
}
}
}
}
Shortcut {
sequence: Settings.getKeySequence(Events.APP_QUIT)
context: Qt.ApplicationShortcut
onActivated: Qt.quit()
}
}