diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-06-30 14:59:21 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-06-30 14:59:59 -0400 |
commit | bae9321c39238314b91f436344439d25a347c588 (patch) | |
tree | a96eb8af9c9f758e849a5ced3569bc0b063faf2d | |
parent | c2fde93c9ef1108c0809a538cf2ec482ed8369a9 (diff) | |
download | efl-bae9321c39238314b91f436344439d25a347c588.tar.gz |
theme: use FLOOR rounding for digital clock themes
the default rounding method allows for a value of 60 when setting the
seconds on a clock
fix T5639
-rw-r--r-- | data/elementary/themes/edc/clock.edc | 5 | ||||
-rw-r--r-- | data/elementary/themes/edc/time.edc | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/data/elementary/themes/edc/clock.edc b/data/elementary/themes/edc/clock.edc index a6ccdaa572..4025882c9a 100644 --- a/data/elementary/themes/edc/clock.edc +++ b/data/elementary/themes/edc/clock.edc @@ -114,7 +114,8 @@ group { name: "e/modules/clock/digital"; date(year, month, day, yearday, weekday, hour, minute, second); dosec = get_int(do_seconds); if (dosec) { - v = round(second); + v = round(second, FLOOR); + v = v % 60; tim = timer(1.0 - (second - v), "clock_cb", 1); // set seconds to v valset("s0", v / 10); @@ -581,7 +582,7 @@ group { name: "e/modules/clock/main"; date(year, month, day, yearday, weekday, hour, minute, second); dosec = get_int(do_seconds); if (dosec) { - v = round(second); + v = round(second, FLOOR); tim = timer(1.0 - (second - v), "clock_cb", 1); custom_state(PART:"seconds", "default", 0.0); diff --git a/data/elementary/themes/edc/time.edc b/data/elementary/themes/edc/time.edc index 712d4a713f..27afb75c8a 100644 --- a/data/elementary/themes/edc/time.edc +++ b/data/elementary/themes/edc/time.edc @@ -276,7 +276,7 @@ group { name: "e/gadget/clock/digital"; #endif dosec = get_int(do_seconds); if (dosec) { - v = round(second); + v = round(second, FLOOR); tim = timer(1.0 - (second - v), "clock_cb", 1); // set seconds to v valset("s0", v / 10); @@ -792,7 +792,7 @@ group { name: "e/gadget/clock/analog"; #endif dosec = get_int(do_seconds); if (dosec) { - v = round(second); + v = round(second, FLOOR); tim = timer(1.0 - (second - v), "clock_cb", 1); custom_state(PART:"seconds", "default", 0.0); |