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=875612180360c71fa1660852b7e1c8f1af482d34;hpb=f753cc5ce64c092ce377abdf7d003b8102c201a0;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 8756121..fd3e72e 100644 --- a/dali-toolkit/devel-api/controls/accessible-impl.cpp +++ b/dali-toolkit/devel-api/controls/accessible-impl.cpp @@ -266,6 +266,23 @@ static Dali::Actor CreateHighlightIndicatorActor() 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(); @@ -295,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); @@ -402,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()