Revert to tizen branch.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / navigation-frame / navigation-title-bar.cpp
index 8ab877a..e8ce9e0 100644 (file)
@@ -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) );
   }