Remove usage of deprecated APIs 98/210398/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 18 Jul 2019 16:57:05 +0000 (17:57 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 18 Jul 2019 18:03:22 +0000 (19:03 +0100)
Change-Id: I885c2099df7b0dcab069eb391c2b6229852f8b06

examples/animated-gradient-call-active/animated-gradient-call-active.cpp
examples/bezier-curve/bezier-curve-example.cpp
examples/homescreen-benchmark/homescreen-benchmark.cpp
examples/super-blur-view/super-blur-view-example.cpp

index 88c86e8..8d17735 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2017 Samsung Electronics Co., Ltd.
+* Copyright (c) 2019 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.
@@ -212,7 +212,7 @@ private:
     mCallStartButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE );
     mCallStartButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE );
     mCallStartButton.SetProperty( Control::Property::BACKGROUND, ICON_CALL_IMAGE );
-    mCallStartButton.SetLabelText("");
+    mCallStartButton.SetProperty( Button::Property::LABEL, "" );
 
     mStage.Add( mCallStartButton );
     mStage.Add( mButtonIconDecall );
@@ -293,7 +293,7 @@ private:
     mCallEndButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, "" );
     mCallEndButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, "" );
     mCallEndButton.SetStyleName( DECLINE_BUTTON_STYLE_STR );
-    mCallEndButton.SetLabelText("");
+    mCallEndButton.SetProperty( Button::Property::LABEL, "" );
 
     mButtonClip.Add( mCallEndButton );
     mButtonClip.Add( mButtonIcon );
index f06f942..8fddca7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -212,7 +212,7 @@ public:
     PushButton play = PushButton::New();
     play.SetName("Play");
     play.SetParentOrigin(ParentOrigin::CENTER);
-    play.SetLabelText("Play");
+    play.SetProperty( Button::Property::LABEL, "Play");
     play.ClickedSignal().Connect( this, &BezierCurveExample::OnPlayClicked );
 
     contentLayout.Add( play );
index 36fa3a8..c32aaf7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -199,22 +199,18 @@ public:
   Actor AddPage()
   {
     // Create root page actor.
-    Actor pageActor;
+    Toolkit::Control pageActor;
 
     if( mConfig.mTableViewEnabled )
     {
-      Toolkit::TableView tableView = Toolkit::TableView::New( mConfig.mRows, mConfig.mCols );
-
-      // Create geometry batcher for table view.
-      tableView.SetBackgroundColor( Vector4( 0.0f, 0.0f, 0.0f, 0.5f ) );
-      pageActor = tableView;
+      pageActor = Toolkit::TableView::New( mConfig.mRows, mConfig.mCols );
     }
     else
     {
       pageActor = Toolkit::Control::New();
-      pageActor.SetProperty( Toolkit::Control::Property::BACKGROUND_COLOR, Vector4( 0.0f, 0.0f, 0.0f, 0.5f ) );
     }
 
+    pageActor.SetBackgroundColor( Vector4( 0.0f, 0.0f, 0.0f, 0.5f ) );
     pageActor.SetParentOrigin( ParentOrigin::CENTER );
     pageActor.SetAnchorPoint( AnchorPoint::CENTER );
     pageActor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
index d90b248..c687de3 100644 (file)
@@ -71,7 +71,7 @@ private:
     mPushButton = PushButton::New();
     mPushButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
     mPushButton.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
-    mPushButton.SetProperty( Button::Property::LABEL_TEXT, "Blur" );
+    mPushButton.SetProperty( Button::Property::LABEL, "Blur" );
     mPushButton.PressedSignal().Connect( this, &SuperBlurViewExample::OnButtonPressed );
     mPushButton.ReleasedSignal().Connect( this, &SuperBlurViewExample::OnButtonReleased );
     stage.Add( mPushButton );