X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Factors%2Factor-impl.cpp;h=2065436c1f8b373a69c55bd5040273fc8218c353;hb=bbbd986a3779df135740042b07321370deac2ba0;hp=a8c9b6ddbaca117ff31346c6aba48c63b7baecba;hpb=a8e17b031ea5832e46538d7091ab1970295d9d4a;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index a8c9b6d..2065436 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -2496,7 +2496,16 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr case Dali::Actor::Property::COLOR: { - SetColor( property.Get< Vector4 >() ); + Property::Type type = property.GetType(); + if( type == Property::VECTOR3 ) + { + Vector3 color = property.Get< Vector3 >(); + SetColor( Vector4( color.r, color.g, color.b, 1.0f ) ); + } + else if( type == Property::VECTOR4 ) + { + SetColor( property.Get< Vector4 >() ); + } break; } @@ -4688,12 +4697,12 @@ void Actor::SetPreferredSize( const Vector2& size ) // A 0 width or height may also be required so if the resize policy has not been changed, i.e. is still set to DEFAULT, // then change to FIXED as well - if( size.width > 0.0f || GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::DEFAULT ) + if( size.width > 0.0f ) { SetResizePolicy( ResizePolicy::FIXED, Dimension::WIDTH ); } - if( size.height > 0.0f || GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::DEFAULT ) + if( size.height > 0.0f ) { SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); }