X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fscroll-view%2Fscroll-view-example.cpp;h=6a083bebb71e42f2bf5ad44adaa861575fe25473;hb=a97c94ece473b511a7ee02acbb729a59e6ba7aa2;hp=de3dfa4725a37b4a1007bb4db8f49c2373037908;hpb=9fbfb29c51bb28cd57b4b89fd5ac837ca10bafe8;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/scroll-view/scroll-view-example.cpp b/examples/scroll-view/scroll-view-example.cpp index de3dfa4..6a083be 100644 --- a/examples/scroll-view/scroll-view-example.cpp +++ b/examples/scroll-view/scroll-view-example.cpp @@ -141,7 +141,7 @@ const Vector3 ANCHOR_3DEFFECT_STYLE1(65.0f, -70.0f, -300.0f); ///< Rotation Anch const unsigned int IMAGE_THUMBNAIL_WIDTH = 256; ///< Width of Thumbnail Image in texels const unsigned int IMAGE_THUMBNAIL_HEIGHT = 256; ///< Height of Thumbnail Image in texels -const float SPIN_DURATION = 5.0f; ///< Times to spin an Image by upon touching, each spin taking a second. +const float SPIN_DURATION = 1.0f; ///< Times to spin an Image by upon touching, each spin taking a second. const float EFFECT_SNAP_DURATION(0.66f); ///< Scroll Snap Duration for Effects const float EFFECT_FLICK_DURATION(0.5f); ///< Scroll Flick Duration for Effects @@ -179,6 +179,8 @@ public: */ void OnInit(Application& app) { + DemoHelper::RequestThemeChange(); + Stage stage = Dali::Stage::GetCurrent(); stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); @@ -613,7 +615,7 @@ private: { // Spin the Image a few times. Animation animation = Animation::New(SPIN_DURATION); - animation.RotateBy( actor, Degree(360.0f * SPIN_DURATION), Vector3::XAXIS, AlphaFunctions::EaseOut); + animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunctions::EaseOut ); animation.Play(); } } @@ -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)