Fixes for text related actors after new size negotiation. 50/37650/2
authorVictor Cebollada <v.cebollada@samsung.com>
Wed, 1 Apr 2015 15:08:52 +0000 (16:08 +0100)
committerVictor Cebollada <v.cebollada@samsung.com>
Thu, 2 Apr 2015 10:10:44 +0000 (11:10 +0100)
Change-Id: I289af8a59b4b1f67fc1dbea92b0457194da6847a
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
examples/text-field/text-field-example.cpp
examples/text-label/text-label-example.cpp

index 814ee3d..a738b18 100644 (file)
@@ -76,9 +76,9 @@ public:
     stage.Add( mContainer );
 
     TextField field = TextField::New();
-    field.SetParentOrigin( ParentOrigin::CENTER );
-    field.SetResizePolicy( FIXED, ALL_DIMENSIONS );
-    field.SetPreferredSize( Vector2(stageSize.width*0.6f, stageSize.width*0.6f) );
+    field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+    field.SetDimensionDependency( HEIGHT, WIDTH );
+    field.SetResizePolicy( FILL_TO_PARENT, WIDTH );
 
     mContainer.Add( field );
 
index fa7e67e..a8476bf 100644 (file)
@@ -127,7 +127,8 @@ public:
     mLabel = TextLabel::New( "A Quick Brown Fox Jumps Over The Lazy Dog" );
     mLabel.SetName( "TextLabel" );
     mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-    mLabel.SetResizePolicy( FILL_TO_PARENT, HEIGHT );
+    mLabel.SetDimensionDependency( HEIGHT, WIDTH );
+    mLabel.SetResizePolicy( FILL_TO_PARENT, WIDTH );
     mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
     mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 1.0f, 1.0f ) );
     mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK );