forked from enlightenment/efl
test_progressbar: Fix weight/align size hints.
Also put weight set first. It is easier to understand logically.
This commit is contained in:
parent
aec1bec0b9
commit
49fae24f74
|
@ -120,7 +120,7 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
evas_object_show(bx);
|
||||
|
||||
pb = elm_progressbar_add(win);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(bx, pb);
|
||||
//elm_progressbar_horizontal_set(pb, EINA_TRUE);
|
||||
|
@ -131,8 +131,8 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
pd->pb1 = pb;
|
||||
|
||||
pb = elm_progressbar_add(win);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_object_text_set(pb, "Infinite bounce");
|
||||
elm_progressbar_pulse_set(pb, EINA_TRUE);
|
||||
elm_box_pack_end(bx, pb);
|
||||
|
@ -150,8 +150,8 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
elm_progressbar_inverted_set(pb, EINA_TRUE);
|
||||
elm_progressbar_unit_format_set(pb, "%1.1f units");
|
||||
elm_progressbar_span_size_set(pb, elm_config_scale_get() * 200);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_box_pack_end(bx, pb);
|
||||
evas_object_show(ic1);
|
||||
evas_object_show(pb);
|
||||
|
@ -166,8 +166,8 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
pb = elm_progressbar_add(win);
|
||||
elm_progressbar_horizontal_set(pb, EINA_FALSE);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(hbx, pb);
|
||||
elm_object_text_set(pb, "percent");
|
||||
evas_object_show(pb);
|
||||
|
@ -175,8 +175,8 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
|
||||
pb = elm_progressbar_add(win);
|
||||
elm_progressbar_horizontal_set(pb, EINA_FALSE);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
elm_progressbar_span_size_set(pb, elm_config_scale_get() * 80);
|
||||
elm_progressbar_pulse_set(pb, EINA_TRUE);
|
||||
elm_progressbar_unit_format_set(pb, NULL);
|
||||
|
@ -196,8 +196,8 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
elm_progressbar_inverted_set(pb, EINA_TRUE);
|
||||
elm_progressbar_unit_format_set(pb, "%1.2f%%");
|
||||
elm_progressbar_span_size_set(pb, elm_config_scale_get() * 200);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(hbx, pb);
|
||||
evas_object_show(ic2);
|
||||
evas_object_show(pb);
|
||||
|
@ -207,8 +207,8 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
elm_object_style_set(pb, "wheel");
|
||||
elm_object_text_set(pb, "Style: wheel");
|
||||
elm_progressbar_pulse_set(pb, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_box_pack_end(bx, pb);
|
||||
evas_object_show(pb);
|
||||
pd->pb7 = pb;
|
||||
|
@ -334,7 +334,7 @@ test_progressbar2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
|
|||
|
||||
pb = elm_progressbar_add(win);
|
||||
elm_object_text_set(pb, "Style: default");
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
elm_progressbar_span_size_set(pb, elm_config_scale_get() * 200);
|
||||
elm_box_pack_end(bx, pb);
|
||||
|
@ -344,7 +344,7 @@ test_progressbar2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
|
|||
pb = elm_progressbar_add(win);
|
||||
elm_object_style_set(pb, "double");
|
||||
elm_object_text_set(pb, "Style: double");
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
elm_progressbar_span_size_set(pb, elm_config_scale_get() * 200);
|
||||
elm_box_pack_end(bx, pb);
|
||||
|
@ -354,7 +354,7 @@ test_progressbar2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
|
|||
pb = elm_progressbar_add(win);
|
||||
elm_object_style_set(pb, "double");
|
||||
elm_object_text_set(pb, "Style: double 2");
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
elm_progressbar_span_size_set(pb, elm_config_scale_get() * 200);
|
||||
elm_box_pack_end(bx, pb);
|
||||
|
@ -365,7 +365,7 @@ test_progressbar2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
|
|||
elm_object_style_set(pb, "double");
|
||||
elm_progressbar_horizontal_set(pb, EINA_FALSE);
|
||||
elm_object_text_set(pb, "Style: Vertical");
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
|
||||
elm_progressbar_span_size_set(pb, elm_config_scale_get() * 200);
|
||||
elm_box_pack_end(bx, pb);
|
||||
|
|
Loading…
Reference in New Issue