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 833b81b..e0c2306 100644 (file)
@@ -132,6 +132,10 @@ void CommonTextUtils::RenderText(
       {
         highlightActor = *it;
       }
       {
         highlightActor = *it;
       }
+      else if(it->GetProperty<std::string>(Dali::Actor::Property::NAME) == "CursorLayerActor")
+      {
+        it->RaiseToTop();
+      }
     }
     clippingDecorationActors.clear();
 
     }
     clippingDecorationActors.clear();
 
index f4d2ca4..d005d94 100644 (file)
@@ -746,15 +746,12 @@ struct Decorator::Impl : public ConnectionTracker
       {
         layer.SetProperty(Actor::Property::NAME, "ActiveLayerActor");
       }
       {
         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;
 #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);
       }
 
       layer.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);