From 9ef0b1d10dfbc8d77a4be0f3d7b8a5285eeabfe6 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Wed, 15 May 2013 20:18:05 +0900 Subject: [PATCH] [slider][access] read out even though slider does not have indicator Change-Id: Ic4367531361d320e436bbb0a24fda4cd4e4e58a2 --- src/lib/elm_slider.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c index a10ce97..dee4b98 100644 --- a/src/lib/elm_slider.c +++ b/src/lib/elm_slider.c @@ -48,7 +48,7 @@ static void _val_fetch(Evas_Object *obj) { Eina_Bool rtl; - double posx = 0.0, posy = 0.0, pos = 0.0, val; + double posx = 0.0, posy = 0.0, pos = 0.0, val, per; char text[1024] = {0,}; Eina_Strbuf *buf = NULL; char *str = NULL; @@ -95,6 +95,12 @@ _val_fetch(Evas_Object *obj) snprintf(text, sizeof(text), sd->indicator, sd->val_max); eina_strbuf_append(buf, text); } + else + { + per = (sd->val / (sd->val_max - sd->val_min)) * 100; + per = abs(per); + eina_strbuf_append_printf(buf, "%d %s 100", (int)floor(per), E_(" of ")); + } _elm_access_say(eina_strbuf_string_get(buf)); eina_strbuf_free(buf); -- 2.7.4