// 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::TextView::New();
- mTitle.SetTextAlignment( Toolkit::Alignment::HorizontalLeft );
- mTitle.SetWidthExceedPolicy(Toolkit::TextView::ShrinkToFit);
- mSubTitle = Toolkit::TextView::New();
- mSubTitle.SetTextAlignment( Toolkit::Alignment::HorizontalLeft );
- mSubTitle.SetWidthExceedPolicy(Toolkit::TextView::ShrinkToFit);
}
void NavigationTitleBar::Update( Toolkit::Page page )
mLayout.AddChild(mButtonLayout, Toolkit::TableView::CellPosition(0,2));
}
- // add title and subtitle(if exist)
- mTitle.SetText( page.GetTitle() );
- mTitle.SetStyleToCurrentText(mCurrentStyle->titleTextStyle);
- 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.SetText( page.GetSubTitle() );
- mSubTitle.SetStyleToCurrentText(mCurrentStyle->subtitleTextStyle);
- mTitleLayout.AddChild( mSubTitle, Toolkit::TableView::CellPosition(2,0) );
- }
-
// insert title icon to the left of the title(if exist)
if( page.GetTitleIcon() )
{