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;
}
{
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 );
}
{
if( value.Get( mTargetSize.width ) )
{
+ if( mRelayoutData && GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED )
+ {
+ mRelayoutData->preferredSize.width = mTargetSize.width;
+ }
+
// Notify deriving classes
OnSizeAnimation( animation, mTargetSize );
}
{
if( value.Get( mTargetSize.height ) )
{
+ if( mRelayoutData && GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED )
+ {
+ mRelayoutData->preferredSize.height = mTargetSize.height;
+ }
+
// Notify deriving classes
OnSizeAnimation( animation, mTargetSize );
}
{
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 );
}
{
if( AdjustValue< float >( mTargetSize.width, value ) )
{
+ if( mRelayoutData && GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::FIXED )
+ {
+ mRelayoutData->preferredSize.width = mTargetSize.width;
+ }
+
// Notify deriving classes
OnSizeAnimation( animation, mTargetSize );
}
{
if( AdjustValue< float >( mTargetSize.height, value ) )
{
+ if( mRelayoutData && GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::FIXED )
+ {
+ mRelayoutData->preferredSize.height = mTargetSize.height;
+ }
+
// Notify deriving classes
OnSizeAnimation( animation, mTargetSize );
}
// 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 );
}