From: Bowon Ryu Date: Mon, 21 Mar 2022 07:12:35 +0000 (+0900) Subject: Fix cursor visible issue on text background X-Git-Tag: dali_2.1.15~8 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=16ef097a0b2d3945a5045db7bb2f3896ed5a5a95;hp=fc4ebd23458e95ade416baeb1a8cf44bac9bca13 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 --- 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);