Commit 8393ca0164e4883e9158e0a1b887ca96657789f1

Authored by Umar
2 parents 95f6f8da acc8d6b3

[dali_1.2.25] Merge branch 'devel/master'

Change-Id: I781b71897d50a4230a6215ce18992fcdb59f5e3b
examples/cube-transition-effect/cube-transition-effect-example.cpp
... ... @@ -25,6 +25,7 @@
25 25 #include <dali/dali.h>
26 26 #include <dali-toolkit/dali-toolkit.h>
27 27 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
  28 +#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
28 29 #include <dali-toolkit/devel-api/transition-effects/cube-transition-effect.h>
29 30 #include <dali-toolkit/devel-api/transition-effects/cube-transition-cross-effect.h>
30 31 #include <dali-toolkit/devel-api/transition-effects/cube-transition-fold-effect.h>
... ... @@ -192,8 +193,6 @@ private:
192 193  
193 194 Vector2 mPanPosition;
194 195 Vector2 mPanDisplacement;
195   -
196   - Toolkit::PushButton mEffectChangeButton;
197 196 };
198 197  
199 198 CubeTransitionApp::CubeTransitionApp( Application& application )
... ... @@ -218,12 +217,18 @@ void CubeTransitionApp::OnInit( Application&amp; application )
218 217 mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" );
219 218 mContent.SetBehavior( Layer::LAYER_3D );
220 219  
221   - // Add an effect-changing button on the right of the tool bar.
222   - mEffectChangeButton = Toolkit::PushButton::New();
223   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE );
224   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE_SELECTED );
225   - mEffectChangeButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked );
226   - mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
  220 +
  221 + // Add an effect changing toggle button
  222 + Toolkit::ToggleButton effectChangeToggleButton = Toolkit::ToggleButton::ToggleButton::New();
  223 +
  224 + effectChangeToggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS,
  225 + Property::Array().Add( EFFECT_WAVE_IMAGE )
  226 + .Add( EFFECT_CROSS_IMAGE)
  227 + .Add( EFFECT_FOLD_IMAGE )
  228 + );
  229 +
  230 + effectChangeToggleButton.ClickedSignal().Connect( this, &CubeTransitionApp::OnEffectButtonClicked );
  231 + mToolBar.AddControl( effectChangeToggleButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
227 232  
228 233 // Add title to the tool bar.
229 234 mTitle = DemoHelper::CreateToolBarLabel( APPLICATION_TITLE_WAVE );
... ... @@ -325,23 +330,16 @@ bool CubeTransitionApp::OnEffectButtonClicked( Toolkit::Button button )
325 330 {
326 331 mCurrentEffect = mCubeCrossEffect;
327 332 mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_CROSS) );
328   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_CROSS_IMAGE );
329   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_CROSS_IMAGE_SELECTED );
330   -
331 333 }
332 334 else if(mCurrentEffect == mCubeCrossEffect)
333 335 {
334 336 mCurrentEffect = mCubeFoldEffect;
335 337 mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_FOLD) );
336   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_FOLD_IMAGE );
337   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_FOLD_IMAGE_SELECTED );
338 338 }
339 339 else
340 340 {
341 341 mCurrentEffect = mCubeWaveEffect;
342 342 mTitle.SetProperty( TextLabel::Property::TEXT, std::string(APPLICATION_TITLE_WAVE) );
343   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE );
344   - mEffectChangeButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, EFFECT_WAVE_IMAGE_SELECTED );
345 343 }
346 344 mContent.Add( mCurrentEffect );
347 345  
... ...
packaging/com.samsung.dali-demo.spec
... ... @@ -2,7 +2,7 @@
2 2  
3 3 Name: com.samsung.dali-demo
4 4 Summary: The OpenGLES Canvas Core Demo
5   -Version: 1.2.24
  5 +Version: 1.2.25
6 6 Release: 1
7 7 Group: System/Libraries
8 8 License: Apache-2.0
... ...