X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Faccessible-impl.cpp;h=fd3e72edd9626b9f629f6c4225b67c26c1eb1063;hb=78c772dd32c14bd500d6d3378ffa3a6e87dc60fa;hp=dd1fc9344e9da8b67778fe02eb9297bedb860b04;hpb=8189dd071c31a8958d71d99fc9cd65de6a85ccb6;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/controls/accessible-impl.cpp b/dali-toolkit/devel-api/controls/accessible-impl.cpp index dd1fc93..fd3e72e 100644 --- a/dali-toolkit/devel-api/controls/accessible-impl.cpp +++ b/dali-toolkit/devel-api/controls/accessible-impl.cpp @@ -168,7 +168,6 @@ Dali::Accessibility::States AccessibleImpl::CalculateStates() s[Dali::Accessibility::State::HIGHLIGHTED] = GetCurrentlyHighlightedActor() == self; s[Dali::Accessibility::State::ENABLED] = true; s[Dali::Accessibility::State::SENSITIVE] = true; - s[Dali::Accessibility::State::ANIMATED] = self.GetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_ANIMATED).Get(); s[Dali::Accessibility::State::VISIBLE] = true; if(modal) { @@ -262,12 +261,28 @@ static Dali::Actor CreateHighlightIndicatorActor() auto actor = Toolkit::ImageView::New(focusBorderImagePath); actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS); DevelControl::AppendAccessibilityAttribute(actor, "highlight", ""); - actor.SetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_ANIMATED, true); actor.SetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE, false); return actor; } +void AccessibleImpl::ScrollToSelf() +{ + auto* child = this; + auto* parent = dynamic_cast(child->GetParent()); + + while (parent) + { + if (parent->IsScrollable()) + { + parent->ScrollToChild(child->Self()); + } + + child = parent; + parent = dynamic_cast(parent->GetParent()); + } +} + bool AccessibleImpl::GrabHighlight() { Dali::Actor self = Self(); @@ -297,7 +312,7 @@ bool AccessibleImpl::GrabHighlight() // Remember the highlight actor, so that when the default is changed with // SetHighlightActor(), the currently displayed highlight can still be cleared. currentHighlightActor = highlight; - EnsureSelfVisible(); + ScrollToSelf(); self.Add(highlight); SetCurrentlyHighlightedActor(self); EmitHighlighted(true); @@ -404,17 +419,9 @@ std::vector AccessibleImpl::GetRelationSet() return ret; } -void AccessibleImpl::EnsureChildVisible(Actor child) -{ -} - -void AccessibleImpl::EnsureSelfVisible() +bool AccessibleImpl::ScrollToChild(Actor child) { - auto parent = dynamic_cast(GetParent()); - if(parent) - { - parent->EnsureChildVisible(Self()); - } + return false; } Dali::Property::Index AccessibleImpl::GetNamePropertyIndex()