X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fnavigation-frame%2Fnavigation-title-bar.cpp;h=e8ce9e0b0b58bc30f1bd13dd55e821ce244acc56;hp=1d653788c7910c01638fba7fadc0c41ac393f522;hb=c38b9091faab34444644f626356abbdb875548d8;hpb=826a077bb3183b5d317bfb22e14ab4e217d26f40 diff --git a/dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.cpp b/dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.cpp index 1d65378..e8ce9e0 100644 --- a/dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.cpp +++ b/dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.cpp @@ -55,6 +55,9 @@ NavigationTitleBar::NavigationTitleBar(NavigationControl& naviControl, // title icon layout: the top row, the bottom row and the left column are all for margins mTitleIconLayout= Toolkit::TableView::New( 3,2 ); SetFixedSizes(); + + mTitle = Toolkit::TextLabel::New(); + mSubTitle = Toolkit::TextLabel::New(); } void NavigationTitleBar::Update( Toolkit::Page page ) @@ -105,6 +108,21 @@ void NavigationTitleBar::Update( Toolkit::Page page ) mLayout.AddChild(mButtonLayout, Toolkit::TableView::CellPosition(0,2)); } + // add title and subtitle(if exist) + mTitle.SetProperty( Toolkit::TextLabel::Property::TEXT, page.GetTitle() ); + if( page.GetSubTitle().empty() ) //display title + { + mTitleLayout.SetFixedHeight( 1,mCurrentStyle->titleHeightWithoutSubtitle - mCurrentStyle->subtitleHeight ); + mTitleLayout.AddChild( mTitle, Toolkit::TableView::CellPosition(1,0,2,1) ); + } + else //display title and subtitle + { + mTitleLayout.SetFixedHeight( 1, mCurrentStyle->titleHeightWithSubtitle ); + mTitleLayout.AddChild( mTitle, Toolkit::TableView::CellPosition(1,0) ); + mSubTitle.SetProperty( Toolkit::TextLabel::Property::TEXT, page.GetSubTitle() ); + mTitleLayout.AddChild( mSubTitle, Toolkit::TableView::CellPosition(2,0) ); + } + // insert title icon to the left of the title(if exist) if( page.GetTitleIcon() ) {