[dali_1.0.37] Merge branch 'tizen'
[platform/core/uifw/dali-demo.git] / examples / scroll-view / scroll-view-example.cpp
index d8d7fa1..6a083be 100644 (file)
@@ -179,6 +179,8 @@ public:
    */
   void OnInit(Application& app)
   {
+    DemoHelper::RequestThemeChange();
+
     Stage stage = Dali::Stage::GetCurrent();
     stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
 
@@ -640,15 +642,12 @@ private:
   {
     if(!mTitleActor)
     {
-      mTitleActor = TextView::New();
+      mTitleActor = DemoHelper::CreateToolBarLabel( "" );
       // Add title to the tool bar.
       mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Alignment::HorizontalCenter );
     }
 
-    Font font = Font::New();
-    mTitleActor.SetText( title );
-    mTitleActor.SetSize( font.MeasureText( title ) );
-    mTitleActor.SetStyleToCurrentText(DemoHelper::GetDefaultTextStyle());
+    mTitleActor.SetProperty( Toolkit::TextLabel::Property::TEXT, title );
   }
 
   /**
@@ -670,7 +669,7 @@ private:
   Application& mApplication;                            ///< Application instance
   Toolkit::View mView;                                  ///< The View instance.
   Toolkit::ToolBar mToolBar;                            ///< The View's Toolbar.
-  TextView mTitleActor;                                 ///< The Toolbar's Title.
+  TextLabel mTitleActor;                                ///< The Toolbar's Title.
   Layer mContentLayer;                                  ///< The content layer (contains game actors)
   ScrollView mScrollView;                               ///< ScrollView UI Component
   bool mScrolling;                                      ///< ScrollView scrolling state (true = scrolling, false = stationary)