actor: Add a custom scriptable "margin" property

The property uses an array with the following CSS style syntax

 [ top, right, bottom, left ] or
 [ top, left/right, bottom ] or
 [ top/bottom, left/right ] or
 [ top/right/bottom/left ]

https://bugzilla.gnome.org/show_bug.cgi?id=676367
This commit is contained in:
Bastian Winkler
2012-05-19 14:37:08 +02:00
parent a2d40fcf8c
commit aeea9ee778
5 changed files with 156 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ json_files = \
test-animator-3.json \
test-state-1.json \
test-script-timeline-markers.json \
test-script-margin.json \
$(NULL)
png_files = \

View File

@@ -0,0 +1,22 @@
[
{
"id" : "actor-1",
"type" : "ClutterActor",
"margin" : [ 10 ]
},
{
"id" : "actor-2",
"type" : "ClutterActor",
"margin" : [ 10, 20 ]
},
{
"id" : "actor-3",
"type" : "ClutterActor",
"margin" : [ 10, 20, 30 ]
},
{
"id" : "actor-4",
"type" : "ClutterActor",
"margin" : [ 10, 20, 30, 40]
}
]