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=8ab877aaad214892b65ad844286ac2ff6e2ec4b9;hb=cd7d41bc8e0a0816da28401207091344fbbe0b2c;hpb=e2eda444afbe82e9591fe198eef339227f90a616 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 8ab877a..e8ce9e0 100644 --- a/dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.cpp +++ b/dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.cpp @@ -1,19 +1,21 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// CLASS HEADER #include "navigation-title-bar.h" namespace Dali @@ -54,12 +56,8 @@ NavigationTitleBar::NavigationTitleBar(NavigationControl& naviControl, 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); + mTitle = Toolkit::TextLabel::New(); + mSubTitle = Toolkit::TextLabel::New(); } void NavigationTitleBar::Update( Toolkit::Page page ) @@ -111,8 +109,7 @@ void NavigationTitleBar::Update( Toolkit::Page page ) } // add title and subtitle(if exist) - mTitle.SetText( page.GetTitle() ); - mTitle.SetStyleToCurrentText(mCurrentStyle->titleTextStyle); + mTitle.SetProperty( Toolkit::TextLabel::Property::TEXT, page.GetTitle() ); if( page.GetSubTitle().empty() ) //display title { mTitleLayout.SetFixedHeight( 1,mCurrentStyle->titleHeightWithoutSubtitle - mCurrentStyle->subtitleHeight ); @@ -122,8 +119,7 @@ void NavigationTitleBar::Update( Toolkit::Page page ) { mTitleLayout.SetFixedHeight( 1, mCurrentStyle->titleHeightWithSubtitle ); mTitleLayout.AddChild( mTitle, Toolkit::TableView::CellPosition(1,0) ); - mSubTitle.SetText( page.GetSubTitle() ); - mSubTitle.SetStyleToCurrentText(mCurrentStyle->subtitleTextStyle); + mSubTitle.SetProperty( Toolkit::TextLabel::Property::TEXT, page.GetSubTitle() ); mTitleLayout.AddChild( mSubTitle, Toolkit::TableView::CellPosition(2,0) ); }