From: Seoyeon Kim Date: Wed, 21 Feb 2024 10:57:47 +0000 (+0900) Subject: [Tizen] Update the size of accessibility highlight on Relayout X-Git-Tag: accepted/tizen/7.0/unified/20240223.161503^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f1bd4f55455c6b7f9e3010f5f37d2df05a1d23e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Update the size of accessibility highlight on Relayout - Accessibility highlight frame should be updated together when the componet size changes. - Currently, if the component size changes while the component is still highlighted, then the frame will remain in its original size. Change-Id: I995e0ec5907dd23282010e0186a7881335dc48ea Signed-off-by: Seoyeon Kim --- diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 3ffaffd..60aaa28 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -670,6 +670,22 @@ void Control::OnRelayout(const Vector2& size, RelayoutContainer& container) container.Add(child, newChildSize); } + if(Accessibility::IsUp()) + { + auto accessible = GetAccessibleObject(); + if(DALI_LIKELY(accessible)) + { + auto highlightFrame = accessible->GetHighlightActor(); + if(accessible->GetCurrentlyHighlightedActor() == this->Self() && + highlightFrame.GetProperty(Dali::Actor::Property::SIZE).GetVectorXY() != size) + { + // TODO : Need to consider how we can reduce this cost + highlightFrame.SetProperty(Actor::Property::SIZE, size); + container.Add(highlightFrame, size); + } + } + } + Toolkit::Visual::Base visual = mImpl->GetVisual(Toolkit::Control::Property::BACKGROUND); if(visual) {