From 16ef097a0b2d3945a5045db7bb2f3896ed5a5a95 Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Mon, 21 Mar 2022 16:12:35 +0900 Subject: [PATCH] Fix cursor visible issue on text background 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 --- dali-toolkit/internal/controls/text-controls/common-text-utils.cpp | 4 ++++ dali-toolkit/internal/text/decorator/text-decorator.cpp | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dali-toolkit/internal/controls/text-controls/common-text-utils.cpp b/dali-toolkit/internal/controls/text-controls/common-text-utils.cpp index 833b81b..e0c2306 100644 --- a/dali-toolkit/internal/controls/text-controls/common-text-utils.cpp +++ b/dali-toolkit/internal/controls/text-controls/common-text-utils.cpp @@ -132,6 +132,10 @@ void CommonTextUtils::RenderText( { highlightActor = *it; } + else if(it->GetProperty(Dali::Actor::Property::NAME) == "CursorLayerActor") + { + it->RaiseToTop(); + } } clippingDecorationActors.clear(); diff --git a/dali-toolkit/internal/text/decorator/text-decorator.cpp b/dali-toolkit/internal/text/decorator/text-decorator.cpp index f4d2ca4..d005d94 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.cpp +++ b/dali-toolkit/internal/text/decorator/text-decorator.cpp @@ -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); -- 2.7.4