[AT-SPI] EmitStateChanged for togglable PushButton 30/244630/19
authorArtur Świgoń <a.swigon@samsung.com>
Tue, 22 Sep 2020 11:52:47 +0000 (13:52 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Fri, 23 Oct 2020 13:07:00 +0000 (15:07 +0200)
Change-Id: Iddc0275ef519346ceddf96d805275ef6ecc5b493

dali-toolkit/internal/controls/buttons/push-button-impl.cpp

index e77bd30..2fadac4 100644 (file)
@@ -215,6 +215,13 @@ void PushButton::OnStateChange( State newState )
     Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(
       Dali::Accessibility::State::PRESSED, newState == SELECTED_STATE ? 1 : 0, 0
     );
     Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(
       Dali::Accessibility::State::PRESSED, newState == SELECTED_STATE ? 1 : 0, 0
     );
+
+    if (Self().GetProperty<bool>(Toolkit::Button::Property::TOGGLABLE))
+    {
+      Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(
+        Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0
+      );
+    }
   }
 }
 
   }
 }