Commit 64eb4f9f2c16148f2d0bae24533881eca0911083

Authored by Adeel Kazmi
1 parent 9a0c0fa5

Updates following size and offset policy property changes

Change-Id: I59fbcbdea60da95ec599528fe76b2a227355711c
examples/styling/image-channel-control-impl.cpp
1 1 /*
2   - * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  2 + * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 3 *
4 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 5 * you may not use this file except in compliance with the License.
... ... @@ -185,7 +185,8 @@ void ImageChannelControl::OnSizeSet( const Vector3& targetSize )
185 185 .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
186 186 .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
187 187 .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
188   - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4::ZERO );
  188 + .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) )
  189 + .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
189 190  
190 191 mVisual.SetTransformAndSize( transformMap, size );
191 192 }
... ...
examples/transitions/shadow-button-impl.cpp
... ... @@ -399,7 +399,7 @@ void ShadowButton::ResetVisual(
399 399  
400 400 bool IsTransformProperty( const std::string& property )
401 401 {
402   - const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetSizeMode" };
  402 + const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" };
403 403 const int NUM_TRANSFORM_PROPERTIES = sizeof( transformProperties ) / sizeof( const char * );
404 404  
405 405 bool found=false;
... ... @@ -418,7 +418,7 @@ void ShadowButton::StoreTargetLayouts( TransitionData transitionData )
418 418 {
419 419 // Pseudo code
420 420 // foreach animator in transitionData
421   - // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetSizeMode" ]
  421 + // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" ]
422 422 // transforms{ animator{"target"} }->{animator{"property"}} = animator{"targetValue"}
423 423  
424 424  
... ...
resources/style/mobile/style-example-theme-one.json.in
... ... @@ -135,7 +135,8 @@
135 135 "transform":{
136 136 "size":[0.12, 0.37],
137 137 "offset":[30,0],
138   - "offsetSizeMode":[1,1,0,0],
  138 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  139 + "sizePolicy":["RELATIVE", "RELATIVE"],
139 140 "origin":"CENTER_BEGIN",
140 141 "anchorPoint":"CENTER_BEGIN"
141 142 },
... ... @@ -153,7 +154,8 @@
153 154 "transform":{
154 155 "size":[0.9, 0.9],
155 156 "offset":[-30,0],
156   - "offsetSizeMode":[1,1,0,0],
  157 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  158 + "sizePolicy":["RELATIVE", "RELATIVE"],
157 159 "origin":"CENTER_END",
158 160 "anchorPoint":"CENTER_END"
159 161 },
... ... @@ -173,7 +175,8 @@
173 175 "transform":{
174 176 "size":[0.12, 0.37],
175 177 "offset":[30,0],
176   - "offsetSizeMode":[1,1,0,0],
  178 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  179 + "sizePolicy":["RELATIVE", "RELATIVE"],
177 180 "origin":"CENTER_BEGIN",
178 181 "anchorPoint":"CENTER_BEGIN"
179 182 },
... ... @@ -262,7 +265,8 @@
262 265 "transform":{
263 266 "size":[0.09, 0.28],
264 267 "offset":[30,0],
265   - "offsetSizeMode":[1,1,0,0],
  268 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  269 + "sizePolicy":["RELATIVE", "RELATIVE"],
266 270 "origin":"CENTER_BEGIN",
267 271 "anchorPoint":"CENTER_BEGIN"
268 272 },
... ... @@ -275,7 +279,8 @@
275 279 "transform":{
276 280 "size":[0.09, 0.28],
277 281 "offset":[30,0],
278   - "offsetSizeMode":[1,1,0,0],
  282 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  283 + "sizePolicy":["RELATIVE", "RELATIVE"],
279 284 "origin":"CENTER_BEGIN",
280 285 "anchorPoint":"CENTER_BEGIN"
281 286 },
... ... @@ -293,7 +298,8 @@
293 298 "transform":{
294 299 "size":[0.9, 0.9],
295 300 "offset":[-30,0],
296   - "offsetSizeMode":[1,1,0,0],
  301 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  302 + "sizePolicy":["RELATIVE", "RELATIVE"],
297 303 "origin":"CENTER_END",
298 304 "anchorPoint":"CENTER_END"
299 305 },
... ... @@ -312,7 +318,8 @@
312 318 "transform":{
313 319 "size":[0.09, 0.28],
314 320 "offset":[30,0],
315   - "offsetSizeMode":[1,1,0,0],
  321 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  322 + "sizePolicy":["RELATIVE", "RELATIVE"],
316 323 "origin":"CENTER_BEGIN",
317 324 "anchorPoint":"CENTER_BEGIN"
318 325 },
... ...
resources/style/mobile/style-example-theme-two.json.in
... ... @@ -159,7 +159,8 @@
159 159 "transform":{
160 160 "size":[0.09, 0.28],
161 161 "offset":[30,0],
162   - "offsetSizeMode":[1,1,0,0],
  162 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  163 + "sizePolicy":["RELATIVE", "RELATIVE"],
163 164 "origin":"CENTER_BEGIN",
164 165 "anchorPoint":"CENTER_BEGIN"
165 166 }
... ... @@ -170,7 +171,8 @@
170 171 "transform":{
171 172 "size":[0.09, 0.28],
172 173 "offset":[30,0],
173   - "offsetSizeMode":[1,1,0,0],
  174 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  175 + "sizePolicy":["RELATIVE", "RELATIVE"],
174 176 "origin":"CENTER_BEGIN",
175 177 "anchorPoint":"CENTER_BEGIN"
176 178 }
... ... @@ -186,7 +188,8 @@
186 188 "transform":{
187 189 "size":[0.9, 0.9],
188 190 "offset":[-30,0],
189   - "offsetSizeMode":[1,1,0,0],
  191 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  192 + "sizePolicy":["RELATIVE", "RELATIVE"],
190 193 "origin":"CENTER_END",
191 194 "anchorPoint":"CENTER_END"
192 195 }
... ...
resources/style/style-example-theme-one.json.in
... ... @@ -135,7 +135,8 @@
135 135 "transform":{
136 136 "size":[0.12, 0.37],
137 137 "offset":[30,0],
138   - "offsetSizeMode":[1,1,0,0],
  138 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  139 + "sizePolicy":["RELATIVE", "RELATIVE"],
139 140 "origin":"CENTER_BEGIN",
140 141 "anchorPoint":"CENTER_BEGIN"
141 142 },
... ... @@ -153,7 +154,8 @@
153 154 "transform":{
154 155 "size":[0.9, 0.9],
155 156 "offset":[-30,0],
156   - "offsetSizeMode":[1,1,0,0],
  157 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  158 + "sizePolicy":["RELATIVE", "RELATIVE"],
157 159 "origin":"CENTER_END",
158 160 "anchorPoint":"CENTER_END"
159 161 },
... ... @@ -173,7 +175,8 @@
173 175 "transform":{
174 176 "size":[0.12, 0.37],
175 177 "offset":[30,0],
176   - "offsetSizeMode":[1,1,0,0],
  178 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  179 + "sizePolicy":["RELATIVE", "RELATIVE"],
177 180 "origin":"CENTER_BEGIN",
178 181 "anchorPoint":"CENTER_BEGIN"
179 182 },
... ... @@ -262,7 +265,8 @@
262 265 "transform":{
263 266 "size":[0.09, 0.28],
264 267 "offset":[30,0],
265   - "offsetSizeMode":[1,1,0,0],
  268 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  269 + "sizePolicy":["RELATIVE", "RELATIVE"],
266 270 "origin":"CENTER_BEGIN",
267 271 "anchorPoint":"CENTER_BEGIN"
268 272 },
... ... @@ -275,7 +279,8 @@
275 279 "transform":{
276 280 "size":[0.09, 0.28],
277 281 "offset":[30,0],
278   - "offsetSizeMode":[1,1,0,0],
  282 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  283 + "sizePolicy":["RELATIVE", "RELATIVE"],
279 284 "origin":"CENTER_BEGIN",
280 285 "anchorPoint":"CENTER_BEGIN"
281 286 },
... ... @@ -293,7 +298,8 @@
293 298 "transform":{
294 299 "size":[0.9, 0.9],
295 300 "offset":[-30,0],
296   - "offsetSizeMode":[1,1,0,0],
  301 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  302 + "sizePolicy":["RELATIVE", "RELATIVE"],
297 303 "origin":"CENTER_END",
298 304 "anchorPoint":"CENTER_END"
299 305 },
... ... @@ -312,7 +318,8 @@
312 318 "transform":{
313 319 "size":[0.09, 0.28],
314 320 "offset":[30,0],
315   - "offsetSizeMode":[1,1,0,0],
  321 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  322 + "sizePolicy":["RELATIVE", "RELATIVE"],
316 323 "origin":"CENTER_BEGIN",
317 324 "anchorPoint":"CENTER_BEGIN"
318 325 },
... ...
resources/style/style-example-theme-two.json.in
... ... @@ -159,7 +159,8 @@
159 159 "transform":{
160 160 "size":[0.09, 0.28],
161 161 "offset":[30,0],
162   - "offsetSizeMode":[1,1,0,0],
  162 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  163 + "sizePolicy":["RELATIVE", "RELATIVE"],
163 164 "origin":"CENTER_BEGIN",
164 165 "anchorPoint":"CENTER_BEGIN"
165 166 }
... ... @@ -170,7 +171,8 @@
170 171 "transform":{
171 172 "size":[0.09, 0.28],
172 173 "offset":[30,0],
173   - "offsetSizeMode":[1,1,0,0],
  174 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  175 + "sizePolicy":["RELATIVE", "RELATIVE"],
174 176 "origin":"CENTER_BEGIN",
175 177 "anchorPoint":"CENTER_BEGIN"
176 178 }
... ... @@ -186,7 +188,8 @@
186 188 "transform":{
187 189 "size":[0.9, 0.9],
188 190 "offset":[-30,0],
189   - "offsetSizeMode":[1,1,0,0],
  191 + "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
  192 + "sizePolicy":["RELATIVE", "RELATIVE"],
190 193 "origin":"CENTER_END",
191 194 "anchorPoint":"CENTER_END"
192 195 }
... ...