Fixing text-label demo mix color bug 52/272952/1
authorDavid Steele <david.steele@samsung.com>
Mon, 28 Mar 2022 10:12:11 +0000 (11:12 +0100)
committerDavid Steele <david.steele@samsung.com>
Mon, 28 Mar 2022 10:12:11 +0000 (11:12 +0100)
Change-Id: Ia6565e94e85a12c296bfdd76e0341103c18a9781

examples/text-label/text-label-example.cpp

index 83743c71b47795402634961b18ac7cb24e86d2e0..f04d074c63c49c90e99dc8bc2435fff045919724 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -253,11 +253,10 @@ public:
     mBorder.SetProperty(Actor::Property::VISIBLE, false);
     mGrabCorner.RaiseToTop();
 
-    mHueAngleIndex         = mLabel.RegisterProperty("hue", 0.0f);
-    Renderer bgRenderer    = mLabel.GetRendererAt(0);
-    mOverrideMixColorIndex = bgRenderer.GetPropertyIndex(ColorVisual::Property::MIX_COLOR);
+    mHueAngleIndex      = mLabel.RegisterProperty("hue", 0.0f);
+    Renderer bgRenderer = mLabel.GetRendererAt(0);
 
-    Constraint constraint = Constraint::New<Vector3>(bgRenderer, mOverrideMixColorIndex, HSVColorConstraint(0.0f, 0.5f, 0.8f));
+    Constraint constraint = Constraint::New<Vector3>(bgRenderer, VisualRenderer::Property::VISUAL_MIX_COLOR, HSVColorConstraint(0.0f, 0.5f, 0.8f));
     constraint.AddSource(Source(mLabel, mHueAngleIndex));
     constraint.SetRemoveAction(Constraint::DISCARD);
     constraint.Apply();