|
|
|
@ -330,17 +330,28 @@ _item_del(void *data, Evas_Object *obj EINA_UNUSED) |
|
|
|
|
static Evas_Object * |
|
|
|
|
_item_column_add(Evas_Object *tb, const char *text, int col) |
|
|
|
|
{ |
|
|
|
|
Evas_Object *rec, *lb; |
|
|
|
|
Evas_Object *hbx, *rec, *lb; |
|
|
|
|
|
|
|
|
|
hbx = elm_box_add(tb); |
|
|
|
|
elm_box_horizontal_set(hbx, 1); |
|
|
|
|
evas_object_size_hint_align_set(hbx, FILL, FILL); |
|
|
|
|
evas_object_size_hint_weight_set(hbx, 1.0, 1.0); |
|
|
|
|
evas_object_show(hbx); |
|
|
|
|
|
|
|
|
|
lb = elm_label_add(tb); |
|
|
|
|
evas_object_data_set(tb, text, lb); |
|
|
|
|
evas_object_size_hint_align_set(lb, FILL, FILL); |
|
|
|
|
evas_object_size_hint_weight_set(lb, EXPAND, EXPAND); |
|
|
|
|
elm_box_pack_end(hbx, lb); |
|
|
|
|
|
|
|
|
|
rec = evas_object_rectangle_add(evas_object_evas_get(tb)); |
|
|
|
|
evas_object_data_set(lb, "rec", rec); |
|
|
|
|
evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(2), 1); |
|
|
|
|
elm_box_pack_end(hbx, rec); |
|
|
|
|
|
|
|
|
|
rec = evas_object_rectangle_add(evas_object_evas_get(tb)); |
|
|
|
|
evas_object_data_set(lb, "rec", rec); |
|
|
|
|
elm_table_pack(tb, rec, col, 0, 1, 1); |
|
|
|
|
elm_table_pack(tb, lb, col, 0, 1, 1); |
|
|
|
|
elm_table_pack(tb, hbx, col, 0, 1, 1); |
|
|
|
|
evas_object_show(lb); |
|
|
|
|
|
|
|
|
|
return lb; |
|
|
|
@ -454,14 +465,26 @@ _item_create(Evas_Object *obj) |
|
|
|
|
} |
|
|
|
|
if (_field_enabled(PROC_FIELD_CPU_USAGE)) |
|
|
|
|
{ |
|
|
|
|
hbx = elm_box_add(tb); |
|
|
|
|
elm_box_horizontal_set(hbx, 1); |
|
|
|
|
evas_object_size_hint_weight_set(hbx, 1.0, 1.0); |
|
|
|
|
evas_object_size_hint_align_set(hbx, FILL, FILL); |
|
|
|
|
|
|
|
|
|
rec = evas_object_rectangle_add(evas_object_evas_get(tb)); |
|
|
|
|
evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(2), 1); |
|
|
|
|
elm_box_pack_end(hbx, rec); |
|
|
|
|
|
|
|
|
|
pb = elm_progressbar_add(hbx); |
|
|
|
|
evas_object_size_hint_weight_set(pb, 0, EXPAND); |
|
|
|
|
evas_object_size_hint_align_set(pb, FILL, FILL); |
|
|
|
|
elm_progressbar_unit_format_set(pb, "%1.1f %%"); |
|
|
|
|
elm_box_pack_end(hbx, pb); |
|
|
|
|
evas_object_show(hbx); |
|
|
|
|
|
|
|
|
|
rec = evas_object_rectangle_add(evas_object_evas_get(tb)); |
|
|
|
|
evas_object_data_set(pb, "rec", rec); |
|
|
|
|
elm_table_pack(tb, rec, i, 0, 1, 1); |
|
|
|
|
elm_table_pack(tb, pb, i++, 0, 1, 1); |
|
|
|
|
elm_table_pack(tb, hbx, i++, 0, 1, 1); |
|
|
|
|
evas_object_data_set(tb, "cpu_u", pb); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|