[slider][access] read out even though slider does not have indicator
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 15 May 2013 11:18:05 +0000 (20:18 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Mon, 27 May 2013 05:17:17 +0000 (14:17 +0900)
Change-Id: Ic4367531361d320e436bbb0a24fda4cd4e4e58a2

src/lib/elm_slider.c

index a10ce97..dee4b98 100644 (file)
@@ -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);