netstar pushed a commit to branch master. http://git.enlightenment.org/apps/evisum.git/commit/?id=e4f81ae9f38424ae90e4c7e7a586108f049d4950
commit e4f81ae9f38424ae90e4c7e7a586108f049d4950 Author: Alastair Poole <nets...@gmail.com> Date: Sun Feb 7 09:34:45 2021 +0000 generic: make sizing consistent? Use a constant so can tweak --- src/bin/ui/ui_disk.c | 7 ++++++- src/bin/ui/ui_process_list.c | 15 ++++++--------- src/bin/ui/ui_process_view.c | 5 +++++ src/bin/ui/ui_util.h | 11 ++++++----- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/bin/ui/ui_disk.c b/src/bin/ui/ui_disk.c index 0c95399..2f3725b 100644 --- a/src/bin/ui/ui_disk.c +++ b/src/bin/ui/ui_disk.c @@ -580,6 +580,11 @@ ui_disk_win_add(Ui *ui) evas_object_size_hint_align_set(tb, FILL, FILL); evas_object_show(tb); + rec = evas_object_rectangle_add(evas_object_evas_get(tb)); + evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT)); + evas_object_size_hint_max_set(rec, -1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT)); + elm_table_pack(tb, rec, i++, 0, 1, 1); + pd->btn_device = btn = elm_button_add(win); evas_object_size_hint_weight_set(btn, EXPAND, 0); evas_object_size_hint_align_set(btn, FILL, FILL); @@ -669,7 +674,7 @@ ui_disk_win_add(Ui *ui) pd->cache = evisum_ui_item_cache_new(genlist, _item_create, 10); - elm_table_pack(tb, scr, 0, 1, 7, 2); + elm_table_pack(tb, scr, 0, 2, 8, 2); elm_object_content_set(win, tb); if (ui->disk.width > 0 && ui->disk.height > 0) diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c index 14ba852..b812929 100644 --- a/src/bin/ui/ui_process_list.c +++ b/src/bin/ui/ui_process_list.c @@ -152,13 +152,14 @@ _item_create(Evas_Object *obj) int i = 0; tb = elm_table_add(obj); - evas_object_size_hint_align_set(tb, FILL, 0); - evas_object_size_hint_weight_set(tb, EXPAND, EXPAND); + evas_object_size_hint_align_set(tb, FILL, FILL); + evas_object_size_hint_weight_set(tb, EXPAND, 0); + hbx = elm_box_add(tb); elm_box_horizontal_set(hbx, 1); evas_object_size_hint_align_set(hbx, 0.0, FILL); - evas_object_size_hint_weight_set(hbx, EXPAND, EXPAND); + evas_object_size_hint_weight_set(hbx, EXPAND, 0); evas_object_show(hbx); ic = elm_icon_add(tb); @@ -1134,16 +1135,12 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent) evas_object_show(tb); rec = evas_object_rectangle_add(evas_object_evas_get(parent)); - evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(24)); - evas_object_size_hint_max_set(rec, 1, ELM_SCALE_SIZE(24)); + evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT)); + evas_object_size_hint_max_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT)); elm_table_pack(tb, rec, i, 1, 1, 1); pd->btn_menu = btn = _btn_create(tb, "menu", _("Menu"), _btn_menu_clicked_cb, pd); - rec = evas_object_rectangle_add(evas_object_evas_get(parent)); - evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(24), ELM_SCALE_SIZE(22)); - evas_object_size_hint_max_set(rec, ELM_SCALE_SIZE(24), ELM_SCALE_SIZE(22)); - elm_table_pack(tb, rec, i, 1, 1, 1); elm_table_pack(tb, btn, i++, 1, 1, 1); pd->btn_cmd = btn = elm_button_add(parent); diff --git a/src/bin/ui/ui_process_view.c b/src/bin/ui/ui_process_view.c index 1a11a3c..4442c1d 100644 --- a/src/bin/ui/ui_process_view.c +++ b/src/bin/ui/ui_process_view.c @@ -1309,6 +1309,11 @@ _threads_tab_add(Evas_Object *parent, Ui_Data *pd) evas_object_show(tb); elm_box_pack_end(bx2, tb); + rec = evas_object_rectangle_add(evas_object_evas_get(tb)); + evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT)); + evas_object_size_hint_max_set(rec, -1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT)); + elm_table_pack(tb, rec, i++, 0, 1, 1); + pd->tab_thread_id = btn = elm_button_add(tb); evas_object_size_hint_weight_set(btn, EXPAND, EXPAND); evas_object_size_hint_align_set(btn, FILL, FILL); diff --git a/src/bin/ui/ui_util.h b/src/bin/ui/ui_util.h index fcb9610..cd35b8e 100644 --- a/src/bin/ui/ui_util.h +++ b/src/bin/ui/ui_util.h @@ -7,11 +7,12 @@ #define FILL EVAS_HINT_FILL #define EXPAND EVAS_HINT_EXPAND -#define TAB_BTN_WIDTH 74 -#define TAB_BTN_HEIGHT 2 -#define BTN_WIDTH 68 -#define BTN_HEIGHT 1 -#define ICON_SIZE 14 +#define TAB_BTN_WIDTH 74 +#define TAB_BTN_HEIGHT 28 +#define BTN_WIDTH 68 +#define BTN_HEIGHT 24 +#define ICON_SIZE 14 +#define LIST_BTN_HEIGHT 28 #define UI_CHILD_WIN_WIDTH 360 #define UI_CHILD_WIN_HEIGHT 360 --