forked from enlightenment/evisum
generic: make sizing consistent?
Use a constant so can tweak
This commit is contained in:
parent
8fb97e3b50
commit
e4f81ae9f3
|
@ -580,6 +580,11 @@ ui_disk_win_add(Ui *ui)
|
||||||
evas_object_size_hint_align_set(tb, FILL, FILL);
|
evas_object_size_hint_align_set(tb, FILL, FILL);
|
||||||
evas_object_show(tb);
|
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);
|
pd->btn_device = btn = elm_button_add(win);
|
||||||
evas_object_size_hint_weight_set(btn, EXPAND, 0);
|
evas_object_size_hint_weight_set(btn, EXPAND, 0);
|
||||||
evas_object_size_hint_align_set(btn, FILL, FILL);
|
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);
|
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);
|
elm_object_content_set(win, tb);
|
||||||
|
|
||||||
if (ui->disk.width > 0 && ui->disk.height > 0)
|
if (ui->disk.width > 0 && ui->disk.height > 0)
|
||||||
|
|
|
@ -152,13 +152,14 @@ _item_create(Evas_Object *obj)
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
tb = elm_table_add(obj);
|
tb = elm_table_add(obj);
|
||||||
evas_object_size_hint_align_set(tb, FILL, 0);
|
evas_object_size_hint_align_set(tb, FILL, FILL);
|
||||||
evas_object_size_hint_weight_set(tb, EXPAND, EXPAND);
|
evas_object_size_hint_weight_set(tb, EXPAND, 0);
|
||||||
|
|
||||||
|
|
||||||
hbx = elm_box_add(tb);
|
hbx = elm_box_add(tb);
|
||||||
elm_box_horizontal_set(hbx, 1);
|
elm_box_horizontal_set(hbx, 1);
|
||||||
evas_object_size_hint_align_set(hbx, 0.0, FILL);
|
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);
|
evas_object_show(hbx);
|
||||||
|
|
||||||
ic = elm_icon_add(tb);
|
ic = elm_icon_add(tb);
|
||||||
|
@ -1134,16 +1135,12 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
|
||||||
evas_object_show(tb);
|
evas_object_show(tb);
|
||||||
|
|
||||||
rec = evas_object_rectangle_add(evas_object_evas_get(parent));
|
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_min_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT));
|
||||||
evas_object_size_hint_max_set(rec, 1, ELM_SCALE_SIZE(24));
|
evas_object_size_hint_max_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT));
|
||||||
elm_table_pack(tb, rec, i, 1, 1, 1);
|
elm_table_pack(tb, rec, i, 1, 1, 1);
|
||||||
|
|
||||||
pd->btn_menu = btn = _btn_create(tb, "menu", _("Menu"),
|
pd->btn_menu = btn = _btn_create(tb, "menu", _("Menu"),
|
||||||
_btn_menu_clicked_cb, pd);
|
_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);
|
elm_table_pack(tb, btn, i++, 1, 1, 1);
|
||||||
|
|
||||||
pd->btn_cmd = btn = elm_button_add(parent);
|
pd->btn_cmd = btn = elm_button_add(parent);
|
||||||
|
|
|
@ -1309,6 +1309,11 @@ _threads_tab_add(Evas_Object *parent, Ui_Data *pd)
|
||||||
evas_object_show(tb);
|
evas_object_show(tb);
|
||||||
elm_box_pack_end(bx2, 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);
|
pd->tab_thread_id = btn = elm_button_add(tb);
|
||||||
evas_object_size_hint_weight_set(btn, EXPAND, EXPAND);
|
evas_object_size_hint_weight_set(btn, EXPAND, EXPAND);
|
||||||
evas_object_size_hint_align_set(btn, FILL, FILL);
|
evas_object_size_hint_align_set(btn, FILL, FILL);
|
||||||
|
|
|
@ -8,10 +8,11 @@
|
||||||
#define EXPAND EVAS_HINT_EXPAND
|
#define EXPAND EVAS_HINT_EXPAND
|
||||||
|
|
||||||
#define TAB_BTN_WIDTH 74
|
#define TAB_BTN_WIDTH 74
|
||||||
#define TAB_BTN_HEIGHT 2
|
#define TAB_BTN_HEIGHT 28
|
||||||
#define BTN_WIDTH 68
|
#define BTN_WIDTH 68
|
||||||
#define BTN_HEIGHT 1
|
#define BTN_HEIGHT 24
|
||||||
#define ICON_SIZE 14
|
#define ICON_SIZE 14
|
||||||
|
#define LIST_BTN_HEIGHT 28
|
||||||
|
|
||||||
#define UI_CHILD_WIN_WIDTH 360
|
#define UI_CHILD_WIN_WIDTH 360
|
||||||
#define UI_CHILD_WIN_HEIGHT 360
|
#define UI_CHILD_WIN_HEIGHT 360
|
||||||
|
|
Loading…
Reference in New Issue