forked from enlightenment/efl
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
This commit is contained in:
parent
c2fde93c9e
commit
bae9321c39
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue