From fdd44e7412775e47763057e9c025f298826a9181 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Thu, 18 Jul 2019 17:57:05 +0100 Subject: [PATCH] Remove usage of deprecated APIs Change-Id: I885c2099df7b0dcab069eb391c2b6229852f8b06 --- .../animated-gradient-call-active.cpp | 6 +++--- examples/bezier-curve/bezier-curve-example.cpp | 4 ++-- examples/homescreen-benchmark/homescreen-benchmark.cpp | 12 ++++-------- examples/super-blur-view/super-blur-view-example.cpp | 2 +- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/examples/animated-gradient-call-active/animated-gradient-call-active.cpp b/examples/animated-gradient-call-active/animated-gradient-call-active.cpp index 88c86e8..8d17735 100644 --- a/examples/animated-gradient-call-active/animated-gradient-call-active.cpp +++ b/examples/animated-gradient-call-active/animated-gradient-call-active.cpp @@ -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 ); diff --git a/examples/bezier-curve/bezier-curve-example.cpp b/examples/bezier-curve/bezier-curve-example.cpp index f06f942..8fddca7 100644 --- a/examples/bezier-curve/bezier-curve-example.cpp +++ b/examples/bezier-curve/bezier-curve-example.cpp @@ -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 ); diff --git a/examples/homescreen-benchmark/homescreen-benchmark.cpp b/examples/homescreen-benchmark/homescreen-benchmark.cpp index 36fa3a8..c32aaf7 100644 --- a/examples/homescreen-benchmark/homescreen-benchmark.cpp +++ b/examples/homescreen-benchmark/homescreen-benchmark.cpp @@ -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 ); diff --git a/examples/super-blur-view/super-blur-view-example.cpp b/examples/super-blur-view/super-blur-view-example.cpp index d90b248..c687de3 100644 --- a/examples/super-blur-view/super-blur-view-example.cpp +++ b/examples/super-blur-view/super-blur-view-example.cpp @@ -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 ); -- 2.7.4