summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib
diff options
context:
space:
mode:
authorBowon Ryu <bowon.ryu@samsung.com>2019-11-18 21:25:26 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2019-11-18 21:25:26 +0900
commitc30176e7ffac0ab70b8ef92cb0fce62b75499181 (patch)
tree41ba8ca7090ddda5baed1b881e13e00d947da5f9 /legacy/elementary/src/lib
parent070cde61b5a55bae055a084aa4dffbca02dfdcba (diff)
slider: fix value error from stepHEADmaster
Summary: When the slider moves using step, _drag_value_fetch(), _val_fetch() calculates a value from position of edje_part. Then the calculated value is updated. However, this causes a slight error. This patch updates value ​​first when moving with steps. * Test Example ``` Evas_Object *sl = elm_slider_add(bx); elm_slider_min_max_set(sl, -5, 5); elm_slider_value_set(sl, 0.0); elm_slider_step_set(sl, 0.1); evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_smart_callback_add(sl, "changed", _change_cb, NULL); ``` ``` void _change_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { double val = elm_slider_value_get(obj); if (val == -5.0) printf("val[%f] == -5.0 \n", val); if (val == -4.0) printf("val[%f] == -4.0 \n", val); if (val == -3.0) printf("val[%f] == -3.0 \n", val); if (val == -2.0) printf("val[%f] == -2.0 \n", val); if (val == -1.0) printf("val[%f] == -1.0 \n", val); if (val == 0.0) printf("val[%f] == 0.0 \n", val); if (val == 1.0) printf("val[%f] == 1.0 \n", val); if (val == 2.0) printf("val[%f] == 2.0 \n", val); if (val == 3.0) printf("val[%f] == 3.0 \n", val); if (val == 4.0) printf("val[%f] == 4.0 \n", val); if (val == 5.0) printf("val[%f] == 5.0 \n", val); } ``` If you move the slider using step in this test, You can see that some logs are not visible. (Some values ​​are incorrect) Test Plan: elementary_test -to slider elementary_test -to efl.ui.slider Reviewers: woohyun, cedric, bu5hm4n Reviewed By: woohyun, bu5hm4n Subscribers: bu5hm4n, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10662
Diffstat (limited to 'legacy/elementary/src/lib')
0 files changed, 0 insertions, 0 deletions