Commit 8adb27803e16e94bb0f63fbd3a650f77fe671c48
1 parent
07c69cd5
[AT-SPI] Squashed implementation
Change-Id: I20d6675ab05cd9eb6344cc11e74aab37ed5f6441
Showing
1 changed file
with
12 additions
and
1 deletions
shared/dali-table-view.cpp
100644 → 100755
| ... | ... | @@ -19,6 +19,11 @@ |
| 19 | 19 | #include "dali-table-view.h" |
| 20 | 20 | |
| 21 | 21 | // EXTERNAL INCLUDES |
| 22 | +#include <dali/devel-api/actors/actor-devel.h> | |
| 23 | +#include <dali/devel-api/images/distance-field.h> | |
| 24 | +#include <dali-toolkit/devel-api/controls/control-devel.h> | |
| 25 | +#include <dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h> | |
| 26 | +#include <dali-toolkit/devel-api/shader-effects/distance-field-effect.h> | |
| 22 | 27 | #include <dali-toolkit/dali-toolkit.h> |
| 23 | 28 | #include <dali-toolkit/devel-api/accessibility-manager/accessibility-manager.h> |
| 24 | 29 | #include <dali-toolkit/devel-api/controls/table-view/table-view.h> |
| ... | ... | @@ -321,7 +326,6 @@ void DaliTableView::CreateFocusEffect() |
| 321 | 326 | auto keyboardFocusManager = KeyboardFocusManager::Get(); |
| 322 | 327 | keyboardFocusManager.PreFocusChangeSignal().Connect(this, &DaliTableView::OnKeyboardPreFocusChange); |
| 323 | 328 | keyboardFocusManager.FocusedActorEnterKeySignal().Connect(this, &DaliTableView::OnFocusedActorActivated); |
| 324 | - AccessibilityManager::Get().FocusedActorActivatedSignal().Connect(this, &DaliTableView::OnFocusedActorActivated); | |
| 325 | 329 | |
| 326 | 330 | // Loop to create both actors for the focus highlight effect. |
| 327 | 331 | for(unsigned int i = 0; i < FOCUS_ANIMATION_ACTOR_NUMBER; ++i) |
| ... | ... | @@ -529,6 +533,7 @@ Actor DaliTableView::CreateTile(const std::string& name, const std::string& titl |
| 529 | 533 | borderImage.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); |
| 530 | 534 | borderImage.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS); |
| 531 | 535 | borderImage.SetProperty(Actor::Property::OPACITY, 0.8f); |
| 536 | + DevelControl::AppendAccessibilityRelation(borderImage, focusableTile, Accessibility::RelationType::CONTROLLED_BY); | |
| 532 | 537 | focusableTile.Add(borderImage); |
| 533 | 538 | |
| 534 | 539 | TextLabel label = TextLabel::New(); |
| ... | ... | @@ -543,11 +548,17 @@ Actor DaliTableView::CreateTile(const std::string& name, const std::string& titl |
| 543 | 548 | |
| 544 | 549 | // Pad around the label as its size is the same as the 9-patch border. It will overlap it without padding. |
| 545 | 550 | label.SetProperty(Actor::Property::PADDING, Padding(TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING, TILE_LABEL_PADDING)); |
| 551 | + DevelControl::AppendAccessibilityRelation(label, focusableTile, Accessibility::RelationType::CONTROLLED_BY); | |
| 546 | 552 | focusableTile.Add(label); |
| 547 | 553 | |
| 548 | 554 | // Connect to the touch events |
| 549 | 555 | focusableTile.TouchedSignal().Connect(this, &DaliTableView::OnTilePressed); |
| 550 | 556 | focusableTile.HoveredSignal().Connect(this, &DaliTableView::OnTileHovered); |
| 557 | + focusableTile.SetProperty(Toolkit::DevelControl::Property::ACCESSIBILITY_ROLE, Dali::Accessibility::Role::PUSH_BUTTON); | |
| 558 | + DevelControl::AccessibilityActivateSignal(focusableTile).Connect(this, [=](){ | |
| 559 | + DoTilePress(focusableTile, PointState::DOWN); | |
| 560 | + DoTilePress(focusableTile, PointState::UP); | |
| 561 | + }); | |
| 551 | 562 | |
| 552 | 563 | return focusableTile; |
| 553 | 564 | } | ... | ... |