// ToolBar image
background.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER );
background.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
- background.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ background.SetSize( mToolBarSize );
RenderableActor renderableActor = RenderableActor::DownCast( background );
if ( renderableActor )
}
Self().Add( background );
+ mBackground = background;
}
void ToolBar::AddControl( Actor control, float relativeSize, Toolkit::Alignment::Type alignment, const Toolkit::Alignment::Padding& padding )
Relayout( mLayout, size, container );
}
+void ToolBar::OnControlSizeSet( const Vector3& targetSize )
+{
+ mToolBarSize = targetSize;
+ mBackground.SetSize( mToolBarSize );
+}
+
} // namespace Internal
} // namespace Toolkit