Commit 3c1c3bb3ccce59b98b0109c21d28b69820deba70

Authored by Agnelo Vaz
1 parent c1c5defb

Label added to Toolbars using correct API not actor Add.

Change-Id: Ifb875f21344436e3a3f210388445af1a00eded08
Signed-off-by: Agnelo Vaz <agnelo.vaz@samsung.com>
Showing 1 changed file with 4 additions and 1 deletions
shared/view.h
... ... @@ -110,7 +110,10 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar&amp; toolBar,
110 110 label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
111 111 label.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::HEIGHT );
112 112 label.SetColor( DEFAULT_TEXT_STYLE_COLOR );
113   - toolBarLayer.Add( label );
  113 +
  114 + // Add title to the tool bar.
  115 + const float padding( style.mToolBarPadding );
  116 + toolBar.AddControl( label, style.mToolBarTitlePercentage, Dali::Toolkit::Alignment::HorizontalCenter, Dali::Toolkit::Alignment::Padding( padding, padding, padding, padding ) );
114 117 }
115 118  
116 119 return toolBarLayer;
... ...