-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTextAnimation.qml
More file actions
71 lines (60 loc) · 1.51 KB
/
TextAnimation.qml
File metadata and controls
71 lines (60 loc) · 1.51 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
//Textanimation
import QtQuick 2.1
Item {
id: textanimation
property bool dimState: screenStateController.dimmedColors
width: 400
height: 200
x : parent.width/2 - 100
y : 0
Item {
id: sprite
anchors.centerIn: parent
height: parent.height
width: parent.width
clip: true
transform: Rotation {
id: rotator
origin{
x: 60
y: 110
}
angle: 0
}
SequentialAnimation {
id: shake
PropertyAnimation { easing.type: Easing.InQuad; duration: 400; target: rotator; property: "angle"; to: 5 }
PropertyAnimation { easing.type: Easing.InQuad; duration: 400; target: rotator; property: "angle"; to: -5 }
}
Timer {
running: true
repeat: true
interval: 800
onTriggered: {
shake.restart();
}
}
Rectangle {
id: spriteImage
color: "white"
anchors.fill: parent
radius: 4
Text{
id: buttonLabel
anchors.centerIn: parent
width: parent.width
font.pixelSize: isNxt ? 30 : 22
font.family: qfont.regular.name
font.bold: true
color: "black"
wrapMode: Text.WordWrap
text: "Hello beta testers: click here to close"
}
MouseArea{
id: buttonMouseArea
anchors.fill: parent
onClicked: {buttonLabel.text = "Clicked";textanimation.destroy();}
}
}
}
}