forked from sanshao27/apktool
/
Splash.qml
102 lines (88 loc) · 3.14 KB
/
Splash.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
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
import QtQuick 2.5
import QtQuick.Controls 1.4
ApplicationWindow {
id: win
height: 800
width: 480
visible: true
title: qsTr("Apktool")
color: "grey"
property int count: key.runCount()+5
Image {
id: msgRect
anchors.fill: parent
source: "image://ThemeProvider/bg"
Text {
id: msg
text: qsTr("unactivated version, Please wait for %1 seconds!").arg(win.count-1)
anchors.bottom: canvas.top
anchors.bottomMargin: (parent.height-canvas.height)/2
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: parent.width/30
color: mc.colorValue("user/textColor")
}
Canvas {
id:canvas
x: 0
y: 267
height: width
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
Behavior on rotation {
NumberAnimation{
duration: (win.count-1)*1000
}
}
Component.onCompleted: rotation = 360
onPaint: {
var context = getContext("2d");
context.beginPath();
context.fillStyle = "black"
context.strokeStyle = "black"
context.arc(width/2, height/2, width/2, Math.PI/2, -Math.PI/2, true)
context.fill();
context.stroke();
context.beginPath();
context.fillStyle = "white"
context.strokeStyle = "white"
context.arc(width/2, height/2, width/2, -Math.PI/2, Math.PI/2, true)
context.fill();
context.stroke();
context.beginPath();
context.fillStyle = "white"
context.strokeStyle = "white"
context.arc(width/2, height/2-width/4, width/4, Math.PI/2, -Math.PI/2, true)
context.fill();
context.stroke();
context.beginPath();
context.fillStyle = "black"
context.strokeStyle = "black"
context.arc(width/2, height/2+width/4, width/4, -Math.PI/2, Math.PI/2, true)
context.fill();
context.stroke();
context.beginPath();
context.fillStyle = "black"
context.strokeStyle = "black"
context.arc(width/2, height/2-width/4, width/15, 0, Math.PI*2, true)
context.fill();
context.stroke();
context.beginPath();
context.fillStyle = "white"
context.strokeStyle = "white "
context.arc(width/2, height/2+width/4, width/15, 0, Math.PI*2, true)
context.fill();
context.stroke();
}
}
Timer {
interval: 1000
repeat: true
running: true
property int c: win.count-1
onTriggered: msg.text = qsTr("unactivated version, Please wait for %1 seconds!").arg(--c)
}
}
}