case Dali::Toolkit::Control::KeyboardFocus::RIGHT:\r
{\r
// the distance between the center verticals\r
- return std::abs(\r
- (((source.top + source.bottom) * 0.5f) -\r
- (((dest.top + dest.bottom) * 0.5f))));\r
+ return std::abs((source.top + (source.bottom - source.top) * 0.5f) -\r
+ (dest.top + (dest.bottom - dest.top) * 0.5f));\r
}\r
case Dali::Toolkit::Control::KeyboardFocus::UP:\r
case Dali::Toolkit::Control::KeyboardFocus::DOWN:\r
{\r
// the distance between the center horizontals\r
- return std::abs(\r
- (((source.left + source.right) * 0.5f) -\r
- (((dest.left + dest.right) * 0.5f))));\r
+ return std::abs((source.left + (source.right - source.left) * 0.5f) -\r
+ (dest.left + (dest.right - dest.left) * 0.5f));\r
}\r
default:\r
{\r
{\r
return (actor.GetProperty<bool>(Actor::Property::KEYBOARD_FOCUSABLE) &&\r
actor.GetProperty<bool>(Actor::Property::VISIBLE) &&\r
- actor.GetProperty<bool>(Actor::Property::SENSITIVE) &&\r
actor.GetProperty<Vector4>(Actor::Property::WORLD_COLOR).a > FULLY_TRANSPARENT);\r
}\r
\r
Actor FindNextFocus(Actor& actor, Actor& focusedActor, Rect<float>& focusedRect, Rect<float>& bestCandidateRect, Toolkit::Control::KeyboardFocus::Direction direction)\r
{\r
Actor nearestActor;\r
- if(actor)\r
+ if(actor && actor.GetProperty<bool>(Actor::Property::VISIBLE) && actor.GetProperty<bool>(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN))\r
{\r
// Recursively children\r
const auto childCount = actor.GetChildCount();\r