X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Ftext-label%2Ftext-label-example.cpp;h=d8c15a8d85ada15e0dbf40cf98adb979156e2ecf;hb=82b918dbf06743b21be30bd10d7d6eb9fe58e339;hp=955466b53b7e5540f8ee326022bc5ac3d3e16018;hpb=a1d8aec7074b6680c717343721644f7556f631fe;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp old mode 100755 new mode 100644 index 955466b..d8c15a8 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -213,7 +213,7 @@ public: mContainer = Control::New(); mContainer.SetName( "Container" ); mContainer.SetParentOrigin( ParentOrigin::CENTER ); - mLayoutSize = Vector2(mStageSize.width*0.6f, mStageSize.height*0.6f); + mLayoutSize = Vector2(mStageSize.width*0.6f, mStageSize.width*0.6f); mContainer.SetSize( mLayoutSize ); stage.Add( mContainer ); @@ -365,7 +365,7 @@ public: case SHADOW : { Vector2 shadowOffset( SHADOW_OFFSET ); // Will be set to zeros if color already set - Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW_COLOR ); + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); Vector4 currentShadowColor; value.Get( currentShadowColor ); @@ -697,13 +697,19 @@ public: } case KEY_S: // Shadow color { - if( Color::BLACK == mLabel.GetProperty( TextLabel::Property::SHADOW_COLOR ) ) + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); + Vector4 shadowColor; + value.Get( shadowColor ); + Property::Map shadowMap; + if( Color::BLACK == shadowColor ) { - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::RED ); + shadowMap.Insert( "color", Color::RED ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); } else { - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK ); + shadowMap.Insert( "color", Color::BLACK ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); } break; } @@ -715,12 +721,26 @@ public: } case KEY_PLUS: // Increase shadow offset { - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty( TextLabel::Property::SHADOW_OFFSET ) + Vector2( 1.0f, 1.0f ) ); + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); + Vector2 shadowOffset; + value.Get( shadowOffset ); + shadowOffset += Vector2( 1.0f, 1.0f ); + + Property::Map shadowMap; + shadowMap.Insert( "offset", shadowOffset ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); break; } case KEY_MINUS: // Decrease shadow offset { - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty( TextLabel::Property::SHADOW_OFFSET ) - Vector2( 1.0f, 1.0f ) ); + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); + Vector2 shadowOffset; + value.Get( shadowOffset ); + shadowOffset -= Vector2( 1.0f, 1.0f ); + + Property::Map shadowMap; + shadowMap.Insert( "offset", shadowOffset ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); break; }