summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kurzberg <i.kurtsberg@samsung.com>2017-10-23 11:44:25 +0300
committerNilesh Trimbake <t.shripati@samsung.com>2018-03-16 15:34:33 +0530
commit65bdd5abbce79d4daa561e430eac80c80996ff05 (patch)
treed171b268985f01cac702689fa69d387458f5fd1b
parentd265e9bf00b30432e5e3963c6c6a8193eee49e85 (diff)
downloadalarm-65bdd5abbce79d4daa561e430eac80c80996ff05.tar.gz
alarm-65bdd5abbce79d4daa561e430eac80c80996ff05.tar.bz2
alarm-65bdd5abbce79d4daa561e430eac80c80996ff05.zip
TizenRefApp-8948 [Screen Reader] Toast popups are not fully read
Change-Id: I342727d25d3dbd737b8eaa276a09da48c59ae82c Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
-rw-r--r--lib-apps-common/inc/Ui/Toast.h3
-rw-r--r--lib-apps-common/src/Ui/Toast.cpp19
2 files changed, 17 insertions, 5 deletions
diff --git a/lib-apps-common/inc/Ui/Toast.h b/lib-apps-common/inc/Ui/Toast.h
index c60c23b..b3a70dc 100644
--- a/lib-apps-common/inc/Ui/Toast.h
+++ b/lib-apps-common/inc/Ui/Toast.h
@@ -46,6 +46,9 @@ namespace Ui
* @see Control::onCreate()
*/
virtual Evas_Object *onCreate(Evas_Object *parent) override;
+
+ private:
+ void onTimeout(Evas_Object *popup, void *eventInfo);
};
}
diff --git a/lib-apps-common/src/Ui/Toast.cpp b/lib-apps-common/src/Ui/Toast.cpp
index 188b01a..5175487 100644
--- a/lib-apps-common/src/Ui/Toast.cpp
+++ b/lib-apps-common/src/Ui/Toast.cpp
@@ -16,6 +16,7 @@
#include "Ui/Toast.h"
#include "Ui/Window.h"
+#include "Utils/Callback.h"
using namespace Ui;
@@ -41,11 +42,19 @@ Evas_Object *Toast::onCreate(Evas_Object *parent)
{
Evas_Object *popup = Popup::onCreate(findParent<Window>(parent)->getEvasObject());
elm_object_style_set(popup, "toast/circle");
- elm_popup_timeout_set(popup, 2.0);
- evas_object_smart_callback_add(popup, "timeout",
- [](void *data, Evas_Object *popup, void *) {
- elm_popup_dismiss(popup);
- }, this);
+ if (!elm_atspi_bridge_utils_is_screen_reader_enabled()) {
+ elm_popup_timeout_set(popup, 2.0);
+ evas_object_smart_callback_add(popup, "timeout",
+ makeCallback(&Toast::onTimeout), this);
+ } else {
+ evas_object_smart_callback_add(popup, "access,read,stop",
+ makeCallback(&Toast::onTimeout), this);
+ }
return popup;
}
+
+void Toast::onTimeout(Evas_Object *popup, void *eventInfo)
+{
+ elm_popup_dismiss(popup);
+}