[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 e77bd301e69afb638dd5afd3965b73015b1f8f9f..2fadac4542e618e3f881e46f4c43513e471e7b38 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
     );
+
+    if (Self().GetProperty<bool>(Toolkit::Button::Property::TOGGLABLE))
+    {
+      Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(
+        Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0
+      );
+    }
   }
 }