From 9f1bd4f55455c6b7f9e3010f5f37d2df05a1d23e Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Wed, 21 Feb 2024 19:57:47 +0900 Subject: [PATCH] [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 --- dali-toolkit/public-api/controls/control-impl.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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) { -- 2.7.4