I made a prev patch to ensure that the cursor layer is on top.
16ef097a0b2d3945a5045db7bb2f3896ed5a5a95
But cursor layer in clippingDecorationActors(in RednerText) is processed only once.
Therefore, if user edit while the background is present, the cursor still invisible.
This patch passes the cursor layer actor as an argument to RenderText(),
so that the cursor is always on top.
Change-Id: I27e3334f74dbca34aaae18089082125c871935fa
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
float& alignmentOffset,
Actor& renderableActor,
Actor& backgroundActor,
+ Actor& cursorLayerActor,
Toolkit::Control& stencil,
std::vector<Actor>& clippingDecorationActors,
std::vector<Toolkit::TextAnchor>& anchorActors,
{
highlightActor = *it;
}
- else if(it->GetProperty<std::string>(Dali::Actor::Property::NAME) == "CursorLayerActor")
- {
- it->RaiseToTop();
- }
}
clippingDecorationActors.clear();
backgroundActor.LowerToBottom();
}
}
+
+ if(cursorLayerActor)
+ {
+ cursorLayerActor.RaiseToTop();
+ }
+
SynchronizeTextAnchorsInParent(textActor, controller, anchorActors);
}
}
float& alignmentOffset,
Actor& renderableActor,
Actor& backgroundActor,
+ Actor& cursorLayerActor,
Toolkit::Control& stencil,
std::vector<Actor>& clippingDecorationActors,
std::vector<Toolkit::TextAnchor>& anchorActors,
void TextEditor::RenderText(Text::Controller::UpdateTextType updateTextType)
{
- CommonTextUtils::RenderText(Self(), mRenderer, mController, mDecorator, mAlignmentOffset, mRenderableActor, mBackgroundActor, mStencil, mClippingDecorationActors, mAnchorActors, updateTextType);
+ CommonTextUtils::RenderText(Self(), mRenderer, mController, mDecorator, mAlignmentOffset, mRenderableActor, mBackgroundActor, mCursorLayer, mStencil, mClippingDecorationActors, mAnchorActors, updateTextType);
if(mRenderableActor)
{
ApplyScrollPosition();
void TextField::RenderText(Text::Controller::UpdateTextType updateTextType)
{
- CommonTextUtils::RenderText(Self(), mRenderer, mController, mDecorator, mAlignmentOffset, mRenderableActor, mBackgroundActor, mStencil, mClippingDecorationActors, mAnchorActors, updateTextType);
+ CommonTextUtils::RenderText(Self(), mRenderer, mController, mDecorator, mAlignmentOffset, mRenderableActor, mBackgroundActor, mCursorLayer, mStencil, mClippingDecorationActors, mAnchorActors, updateTextType);
}
void TextField::OnKeyInputFocusGained()
{
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);