summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdeel Kazmi <adeel.kazmi@samsung.com>2017-03-16 18:35:16 +0000
committerAdeel Kazmi <adeel.kazmi@samsung.com>2017-03-16 18:45:44 +0000
commit64eb4f9f2c16148f2d0bae24533881eca0911083 (patch)
tree7e0b771f48ebd374ca711b629bf908e69d2c13f2
parent9a0c0fa58215976412b8cb028251ab9a2c9c4c2c (diff)
downloaddali-demo-64eb4f9f2c16148f2d0bae24533881eca0911083.tar.gz
dali-demo-64eb4f9f2c16148f2d0bae24533881eca0911083.tar.bz2
dali-demo-64eb4f9f2c16148f2d0bae24533881eca0911083.zip
Updates following size and offset policy property changes
Change-Id: I59fbcbdea60da95ec599528fe76b2a227355711c
-rw-r--r--examples/styling/image-channel-control-impl.cpp5
-rw-r--r--examples/transitions/shadow-button-impl.cpp4
-rw-r--r--resources/style/mobile/style-example-theme-one.json.in21
-rw-r--r--resources/style/mobile/style-example-theme-two.json.in9
-rw-r--r--resources/style/style-example-theme-one.json.in21
-rw-r--r--resources/style/style-example-theme-two.json.in9
6 files changed, 45 insertions, 24 deletions
diff --git a/examples/styling/image-channel-control-impl.cpp b/examples/styling/image-channel-control-impl.cpp
index 631c0fa4..2d2f48ce 100644
--- a/examples/styling/image-channel-control-impl.cpp
+++ b/examples/styling/image-channel-control-impl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -185,7 +185,8 @@ void ImageChannelControl::OnSizeSet( const Vector3& targetSize )
.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
.Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
.Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4::ZERO );
+ .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) )
+ .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
mVisual.SetTransformAndSize( transformMap, size );
}
diff --git a/examples/transitions/shadow-button-impl.cpp b/examples/transitions/shadow-button-impl.cpp
index 8a6ea568..e24041ad 100644
--- a/examples/transitions/shadow-button-impl.cpp
+++ b/examples/transitions/shadow-button-impl.cpp
@@ -399,7 +399,7 @@ void ShadowButton::ResetVisual(
bool IsTransformProperty( const std::string& property )
{
- const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetSizeMode" };
+ const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" };
const int NUM_TRANSFORM_PROPERTIES = sizeof( transformProperties ) / sizeof( const char * );
bool found=false;
@@ -418,7 +418,7 @@ void ShadowButton::StoreTargetLayouts( TransitionData transitionData )
{
// Pseudo code
// foreach animator in transitionData
- // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetSizeMode" ]
+ // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" ]
// transforms{ animator{"target"} }->{animator{"property"}} = animator{"targetValue"}
diff --git a/resources/style/mobile/style-example-theme-one.json.in b/resources/style/mobile/style-example-theme-one.json.in
index 67ade2db..74025d23 100644
--- a/resources/style/mobile/style-example-theme-one.json.in
+++ b/resources/style/mobile/style-example-theme-one.json.in
@@ -135,7 +135,8 @@
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -153,7 +154,8 @@
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
@@ -173,7 +175,8 @@
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -262,7 +265,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -275,7 +279,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -293,7 +298,8 @@
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
@@ -312,7 +318,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
diff --git a/resources/style/mobile/style-example-theme-two.json.in b/resources/style/mobile/style-example-theme-two.json.in
index 54857ba3..fa8ed33d 100644
--- a/resources/style/mobile/style-example-theme-two.json.in
+++ b/resources/style/mobile/style-example-theme-two.json.in
@@ -159,7 +159,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
@@ -170,7 +171,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
@@ -186,7 +188,8 @@
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
}
diff --git a/resources/style/style-example-theme-one.json.in b/resources/style/style-example-theme-one.json.in
index eb10fa35..51ddc8b2 100644
--- a/resources/style/style-example-theme-one.json.in
+++ b/resources/style/style-example-theme-one.json.in
@@ -135,7 +135,8 @@
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -153,7 +154,8 @@
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
@@ -173,7 +175,8 @@
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -262,7 +265,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -275,7 +279,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
@@ -293,7 +298,8 @@
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
@@ -312,7 +318,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
diff --git a/resources/style/style-example-theme-two.json.in b/resources/style/style-example-theme-two.json.in
index 791a79e3..d689bff1 100644
--- a/resources/style/style-example-theme-two.json.in
+++ b/resources/style/style-example-theme-two.json.in
@@ -159,7 +159,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
@@ -170,7 +171,8 @@
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
@@ -186,7 +188,8 @@
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
}