From 3c1c3bb3ccce59b98b0109c21d28b69820deba70 Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Wed, 8 Apr 2015 18:02:05 +0100 Subject: [PATCH] Label added to Toolbars using correct API not actor Add. Change-Id: Ifb875f21344436e3a3f210388445af1a00eded08 Signed-off-by: Agnelo Vaz --- shared/view.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/view.h b/shared/view.h index c64a263..1a87f67 100644 --- a/shared/view.h +++ b/shared/view.h @@ -110,7 +110,10 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar, label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); label.SetResizePolicy( Dali::FILL_TO_PARENT, Dali::HEIGHT ); label.SetColor( DEFAULT_TEXT_STYLE_COLOR ); - toolBarLayer.Add( label ); + + // Add title to the tool bar. + const float padding( style.mToolBarPadding ); + toolBar.AddControl( label, style.mToolBarTitlePercentage, Dali::Toolkit::Alignment::HorizontalCenter, Dali::Toolkit::Alignment::Padding( padding, padding, padding, padding ) ); } return toolBarLayer; -- 2.7.4