From: Seoyeon Kim Date: Wed, 21 Feb 2024 10:57:47 +0000 (+0900) Subject: Update the size of accessibility highlight on Relayout X-Git-Tag: dali_2.4.3~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=546ea49376d728eb6e4dc4975f9dcc6dfad57625;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 5cce72d5b8..e520aa8807 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -701,6 +701,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); + } + } + } + // Apply FittingMode here mImpl->ApplyFittingMode(size); }