Fix cursor visible issue on text background 86/272586/1
authorBowon Ryu <bowon.ryu@samsung.com>
Mon, 21 Mar 2022 07:12:35 +0000 (16:12 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Mon, 21 Mar 2022 07:12:35 +0000 (16:12 +0900)
In some cases, the cursor layer actor is not visible.
Because the text background actor is positioned above the cursor layer actor.
This patch ensures that the cursor layer actor is always on the top.

Change-Id: I1f601e9e648e2983a2703bda03c82cd92bcff16f
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali-toolkit/internal/controls/text-controls/common-text-utils.cpp
dali-toolkit/internal/text/decorator/text-decorator.cpp

index 833b81bf96fe8d8fb7b99259ff1c50853fb2a3a1..e0c2306ab6e5336929ba1849bcfef16684b118d9 100644 (file)
@@ -132,6 +132,10 @@ void CommonTextUtils::RenderText(
       {
         highlightActor = *it;
       }
+      else if(it->GetProperty<std::string>(Dali::Actor::Property::NAME) == "CursorLayerActor")
+      {
+        it->RaiseToTop();
+      }
     }
     clippingDecorationActors.clear();
 
index f4d2ca41387a23862319beaa2ffbb3e6bf94813b..d005d94f93834d5e17b57ba7b1b063a4ea94114d 100644 (file)
@@ -746,15 +746,12 @@ struct Decorator::Impl : public ConnectionTracker
       {
         layer.SetProperty(Actor::Property::NAME, "ActiveLayerActor");
       }
-      else if(type == DecorationType::CURSOR_LAYER)
-      {
-        layer.SetProperty(Actor::Property::NAME, "CursorLayerActor");
-      }
 #endif
       bool needsClipping = false;
       if(type == DecorationType::CURSOR_LAYER)
       {
         needsClipping = true;
+        layer.SetProperty(Actor::Property::NAME, "CursorLayerActor");
       }
 
       layer.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);