-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cellule.qml
78 lines (69 loc) · 1.69 KB
/
Cellule.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
import QtQuick 2.0
Rectangle {
id: tile
property string value: ""
property int size: {(400/modelgrille.get_Taille)-12}
property int taillePolice: 15
width: size
height: size
color: "#c8cbc2"
radius: 10
Text {
id: val
text: value
font.pointSize: taillePolice
anchors.centerIn: parent
color: "black"
}
states:[
State{
name:"0"
PropertyChanges{target : tile; color: "#c8cbc2"}
PropertyChanges{target: val; color: "#c8cbc2"}
},
State{
name:"2"
PropertyChanges{target : tile; color: "#e1d2c4"}
},
State{
name:"4"
PropertyChanges{target : tile; color: "#e9dbb8"}
},
State{
name:"8"
PropertyChanges{target : tile; color: "#ea9366"}
},
State{
name:"16"
PropertyChanges{target : tile; color: "#f16c34"}
},
State{
name:"32"
PropertyChanges{target : tile; color: "#d44c12"}
},
State{
name:"64"
PropertyChanges{target : tile; color: "#b62d00"}
},
State{
name:"128"
PropertyChanges{target : tile; color: "#f4e776"}
},
State{
name:"256"
PropertyChanges{target : tile; color: "#e4d135"}
},
State{
name:"512"
PropertyChanges{target : tile; color: "#e3cf0f"}
},
State{
name:"1024"
PropertyChanges{target : tile; color: "#cfbb05"}
},
State{
name:"2048"
PropertyChanges{target : tile; color: "#eb2525"}
}
]
}