forked from enlightenment/efl
efl_ui/timepicker: fix range clamping on 12 hour timepickers
Summary: this errors all the time otherwise Reviewers: devilhorns Reviewed By: devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9396
This commit is contained in:
parent
13b84f3736
commit
d00248ca97
|
@ -59,7 +59,7 @@ _field_value_update(Eo *obj)
|
||||||
|
|
||||||
if (!pd->is_24hour)
|
if (!pd->is_24hour)
|
||||||
{
|
{
|
||||||
if (pd->cur_time[TIMEPICKER_HOUR] >= 12)
|
if (pd->cur_time[TIMEPICKER_HOUR] > 12)
|
||||||
{
|
{
|
||||||
//TODO: gets text from strftime.
|
//TODO: gets text from strftime.
|
||||||
efl_text_set(pd->ampm, "PM");
|
efl_text_set(pd->ampm, "PM");
|
||||||
|
@ -68,7 +68,7 @@ _field_value_update(Eo *obj)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
efl_text_set(pd->ampm, "AM");
|
efl_text_set(pd->ampm, "AM");
|
||||||
efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR] + 12);
|
efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue