From 1c161ead142a0ff889708effe1ba6d02b64c1754 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Tue, 3 Oct 2017 19:02:58 +0100 Subject: [PATCH] Changes required after TextLabel Devel properties were made public Change-Id: Ic5d4e71314e7cb4fd084678f1c3837adfea97fe2 --- examples/image-view/image-view-example.cpp | 3 +-- examples/property-notification/property-notification-example.cpp | 7 +++---- examples/text-label/text-label-example.cpp | 9 ++++----- examples/text-scrolling/text-scrolling-example.cpp | 7 +++---- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/examples/image-view/image-view-example.cpp b/examples/image-view/image-view-example.cpp index 3447c84..a772665 100644 --- a/examples/image-view/image-view-example.cpp +++ b/examples/image-view/image-view-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -19,7 +19,6 @@ #include "shared/view.h" #include #include -#include using namespace Dali; diff --git a/examples/property-notification/property-notification-example.cpp b/examples/property-notification/property-notification-example.cpp index 3d3b6d6..8748533 100644 --- a/examples/property-notification/property-notification-example.cpp +++ b/examples/property-notification/property-notification-example.cpp @@ -17,7 +17,6 @@ #include #include -#include using namespace Dali; using namespace Dali::Toolkit; @@ -68,16 +67,16 @@ public: mTextLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); mTextLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); mTextLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); - mTextLabel.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::BLACK ); + mTextLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK ); stage.Add( mTextLabel ); // Create an animation and animate the text color to red Animation animation = Animation::New( COLOR_ANIMATION_DURATION ); - animation.AnimateTo( Property( mTextLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::RED ); + animation.AnimateTo( Property( mTextLabel, TextLabel::Property::TEXT_COLOR ), Color::RED ); animation.Play(); // Set up a property notification so we are notified when the red component of the text-color reaches 50% - PropertyNotification notification = mTextLabel.AddPropertyNotification( DevelTextLabel::Property::TEXT_COLOR_RED, GreaterThanCondition( 0.5f ) ); + PropertyNotification notification = mTextLabel.AddPropertyNotification( TextLabel::Property::TEXT_COLOR_RED, GreaterThanCondition( 0.5f ) ); notification.NotifySignal().Connect( this, &PropertyNotificationController::RedComponentNotification ); } diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp index ada8b1c..759a684 100644 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -23,7 +23,6 @@ // EXTERNAL INCLUDES #include #include -#include #include #include #include @@ -209,7 +208,7 @@ public: mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT ); mLabel.SetSize(mLayoutSize); mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); - mLabel.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::GREEN ); + mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN ); mLabel.SetBackgroundColor( Color::WHITE ); mContainer.Add( mLabel ); @@ -256,7 +255,7 @@ public: // Animate the text color 3 times from source color to Yellow Animation animation = Animation::New( 2.f ); - animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::YELLOW, AlphaFunction::SIN ); + animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::YELLOW, AlphaFunction::SIN ); animation.SetLoopCount( 3 ); animation.Play(); @@ -270,7 +269,7 @@ public: if( button == mStyleButtons[ StyleType::TEXT_COLOR ] ) { Animation animation = Animation::New( 2.f ); - animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), mSelectedColor, AlphaFunction::LINEAR ); + animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), mSelectedColor, AlphaFunction::LINEAR ); animation.Play(); } else if( button == mStyleButtons[ StyleType::OUTLINE ] ) @@ -463,7 +462,7 @@ public: case KEY_A: // Animate text colour { Animation animation = Animation::New( 2.f ); - animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::RED, AlphaFunction::SIN ); + animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::RED, AlphaFunction::SIN ); animation.SetLoopCount( 3 ); animation.Play(); break; diff --git a/examples/text-scrolling/text-scrolling-example.cpp b/examples/text-scrolling/text-scrolling-example.cpp index 2db7033..5a4ff9e 100644 --- a/examples/text-scrolling/text-scrolling-example.cpp +++ b/examples/text-scrolling/text-scrolling-example.cpp @@ -23,7 +23,6 @@ // EXTERNAL INCLUDES #include #include -#include using namespace Dali; using namespace Dali::Toolkit; @@ -190,8 +189,8 @@ public: Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New(); scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl ); CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton ); - mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::IMMEDIATE ); - mRtlLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f ); + mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE ); + mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f ); CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE ); boxE.SetPosition( 0.0f, -100.0f, 1.0f ); @@ -201,7 +200,7 @@ public: mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_SPEED, 500); mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_GAP, 500); mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 3); - mRtlLongLabel.SetProperty(DevelTextLabel::Property::AUTO_SCROLL_STOP_MODE, DevelTextLabel::AutoScrollStopMode::FINISH_LOOP ); + mRtlLongLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP ); mPanGestureDetector = PanGestureDetector::New(); mPanGestureDetector.DetectedSignal().Connect(this, &TextScrollingExample::OnPanGesture ); -- 2.7.4