X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Factors%2Factor-impl.cpp;h=2065436c1f8b373a69c55bd5040273fc8218c353;hb=bbbd986a3779df135740042b07321370deac2ba0;hp=ed576d1d14d5d45765e9353f66be69b7197cbe0f;hpb=07a8c1ac04cd3d69d1de6ae4b2c86d04255f07f1;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 ed576d1..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; } @@ -2921,6 +2930,19 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( value.Get( mTargetSize ) ) { + if( mRelayoutData ) + { + if( GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.width = mTargetSize.width; + } + + if( GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.height = mTargetSize.height; + } + } + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -2931,6 +2953,11 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( value.Get( mTargetSize.width ) ) { + if( mRelayoutData && GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.width = mTargetSize.width; + } + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -2941,6 +2968,11 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( value.Get( mTargetSize.height ) ) { + if( mRelayoutData && GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.height = mTargetSize.height; + } + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -3065,6 +3097,19 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( AdjustValue< Vector3 >( mTargetSize, value ) ) { + if( mRelayoutData ) + { + if( GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.width = mTargetSize.width; + } + + if( GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.height = mTargetSize.height; + } + } + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -3075,6 +3120,11 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( AdjustValue< float >( mTargetSize.width, value ) ) { + if( mRelayoutData && GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.width = mTargetSize.width; + } + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -3085,6 +3135,11 @@ void Actor::OnNotifyDefaultPropertyAnimation( Animation& animation, Property::In { if( AdjustValue< float >( mTargetSize.height, value ) ) { + if( mRelayoutData && GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED ) + { + mRelayoutData->preferredSize.height = mTargetSize.height; + } + // Notify deriving classes OnSizeAnimation( animation, mTargetSize ); } @@ -4642,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 ); }