summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-10 16:24:11 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-10 16:44:35 +0900
commitd26f2237f18cf9408265a867bbba4027fc6e94a1 (patch)
treeabf2890a9038016930e5b23efb7a365f8dfea40e
parent1d5de2e58e37592bd0348ce182fb3fa5e84fce2e (diff)
elm progressbar - fix val set
set initial min and max to 0 and 1 respectively so val set works at the start... fixes T6697 @fix
-rw-r--r--src/bin/elementary/test_progressbar.c2
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/elementary/test_progressbar.c b/src/bin/elementary/test_progressbar.c
index 371c902bf0..0ac8fdf892 100644
--- a/src/bin/elementary/test_progressbar.c
+++ b/src/bin/elementary/test_progressbar.c
@@ -172,7 +172,7 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
172 evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL); 172 evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
173 elm_box_pack_end(hbx, pb); 173 elm_box_pack_end(hbx, pb);
174 elm_progressbar_unit_format_set(pb, form); 174 elm_progressbar_unit_format_set(pb, form);
175 elm_progressbar_value_set(pb, 0.5); 175 elm_progressbar_value_set(pb, .50);
176 elm_object_text_set(pb, "percent"); 176 elm_object_text_set(pb, "percent");
177 evas_object_show(pb); 177 evas_object_show(pb);
178 pd->pb4 = pb; 178 pd->pb4 = pb;
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index 4ebb7b921d..40a6a66a1b 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -428,7 +428,7 @@ _efl_ui_progressbar_efl_object_constructor(Eo *obj, Efl_Ui_Progressbar_Data *_pd
428 obj = efl_constructor(efl_super(obj, MY_CLASS)); 428 obj = efl_constructor(efl_super(obj, MY_CLASS));
429 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 429 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
430 efl_access_role_set(obj, EFL_ACCESS_ROLE_PROGRESS_BAR); 430 efl_access_role_set(obj, EFL_ACCESS_ROLE_PROGRESS_BAR);
431 431 efl_ui_range_min_max_set(obj, 0.0, 1.0);
432 return obj; 432 return obj;
433} 433}
434 434
@@ -532,7 +532,7 @@ _progressbar_part_value_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, const char *pa
532 Efl_Ui_Progress_Status *ps; 532 Efl_Ui_Progress_Status *ps;
533 Eina_Bool existing_ps = EINA_FALSE; 533 Eina_Bool existing_ps = EINA_FALSE;
534 Eina_List *l; 534 Eina_List *l;
535 double min, max; 535 double min = 0.0, max = 0.0;
536 536
537 efl_ui_range_min_max_get(efl_part(obj, part_name), &min, &max); 537 efl_ui_range_min_max_get(efl_part(obj, part_name), &min, &max);
538 538
@@ -556,6 +556,7 @@ _progressbar_part_value_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, const char *pa
556 ps = _progress_status_new(part_name, val); 556 ps = _progress_status_new(part_name, val);
557 ps->val_min = 0.0; 557 ps->val_min = 0.0;
558 ps->val_max = 1.0; 558 ps->val_max = 1.0;
559 ps->val = val;
559 sd->progress_status = eina_list_append(sd->progress_status, ps); 560 sd->progress_status = eina_list_append(sd->progress_status, ps);
560 } 561 }
561 else 562 else