| 1 |
[ |
| 2 |
{ |
| 3 |
"id" : "button", |
| 4 |
"type" : "ClutterRectangle", |
| 5 |
|
| 6 |
"width" : "16 em", |
| 7 |
"height" : "6 em", |
| 8 |
|
| 9 |
"color" : "rgb(255, 0, 0)", |
| 10 |
"opacity" : 128, |
| 11 |
|
| 12 |
"scale-gravity" : "center", |
| 13 |
|
| 14 |
"reactive" : true, |
| 15 |
|
| 16 |
"signals" : [ |
| 17 |
{ |
| 18 |
"name" : "button-press-event", |
| 19 |
"handler" : "on_button_press" |
| 20 |
}, |
| 21 |
{ "name" : "enter-event", "states" : "button-states", "target-state" : "hover" }, |
| 22 |
{ "name" : "leave-event", "states" : "button-states", "target-state" : "base" }, |
| 23 |
{ "name" : "button-press-event", "states" : "button-states", "target-state" : "active" }, |
| 24 |
{ "name" : "button-release-event", "states" : "button-states", "target-state" : "hover" } |
| 25 |
] |
| 26 |
}, |
| 27 |
|
| 28 |
{ |
| 29 |
"id" : "button-states", |
| 30 |
"type" : "ClutterState", |
| 31 |
|
| 32 |
"duration" : 250, |
| 33 |
|
| 34 |
"transitions" : [ |
| 35 |
{ |
| 36 |
"source" : null, |
| 37 |
"target" : "base", |
| 38 |
|
| 39 |
"keys" : [ |
| 40 |
[ "button", "opacity", "linear", 128 ], |
| 41 |
[ "button", "scale-x", "ease-in-cubic", 1.0 ], |
| 42 |
[ "button", "scale-y", "ease-in-cubic", 1.0 ], |
| 43 |
[ "button", "color", "linear", "rgb(255, 0, 0)" ] |
| 44 |
] |
| 45 |
}, |
| 46 |
{ |
| 47 |
"source" : null, |
| 48 |
"target" : "hover", |
| 49 |
|
| 50 |
"keys" : [ |
| 51 |
[ "button", "opacity", "linear", 255 ], |
| 52 |
[ "button", "scale-x", "ease-out-bounce", 1.4 ], |
| 53 |
[ "button", "scale-y", "ease-out-bounce", 1.4 ], |
| 54 |
[ "button", "color", "linear", "rgb(0, 255, 0)" ] |
| 55 |
] |
| 56 |
}, |
| 57 |
{ |
| 58 |
"source" : null, |
| 59 |
"target" : "active", |
| 60 |
|
| 61 |
"keys" : [ |
| 62 |
[ "button", "opacity", "linear", 255 ], |
| 63 |
[ "button", "color", "linear", "rgb(0, 0, 255)" ] |
| 64 |
] |
| 65 |
} |
| 66 |
] |
| 67 |
} |
| 68 |
] |