ui: Max width for other content.
If this content is allowed to expand it looks AWFUL.
This commit is contained in:
parent
d798bce95b
commit
fc9afb8a24
|
@ -5,6 +5,7 @@ void
|
||||||
ui_tab_disk_add(Ui *ui)
|
ui_tab_disk_add(Ui *ui)
|
||||||
{
|
{
|
||||||
Evas_Object *parent, *box, *hbox, *frame, *scroller;
|
Evas_Object *parent, *box, *hbox, *frame, *scroller;
|
||||||
|
Evas_Object *table, *rect;
|
||||||
|
|
||||||
parent = ui->content;
|
parent = ui->content;
|
||||||
|
|
||||||
|
@ -31,7 +32,19 @@ ui_tab_disk_add(Ui *ui)
|
||||||
elm_scroller_policy_set(scroller,
|
elm_scroller_policy_set(scroller,
|
||||||
ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
|
ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
|
||||||
evas_object_show(scroller);
|
evas_object_show(scroller);
|
||||||
elm_object_content_set(scroller, hbox);
|
|
||||||
|
table = elm_table_add(parent);
|
||||||
|
evas_object_size_hint_weight_set(table, EXPAND, EXPAND);
|
||||||
|
evas_object_size_hint_align_set(table, FILL, FILL);
|
||||||
|
evas_object_show(table);
|
||||||
|
|
||||||
|
rect = evas_object_rectangle_add(evas_object_rectangle_add(parent));
|
||||||
|
evas_object_size_hint_max_set(rect, MISC_MAX_WIDTH, -1);
|
||||||
|
evas_object_size_hint_min_set(rect, MISC_MIN_WIDTH, 1);
|
||||||
|
|
||||||
|
elm_table_pack(table, rect, 0, 0, 1, 1);
|
||||||
|
elm_table_pack(table, hbox, 0, 0, 1, 1);
|
||||||
|
elm_object_content_set(scroller, table);
|
||||||
|
|
||||||
elm_object_content_set(frame, scroller);
|
elm_object_content_set(frame, scroller);
|
||||||
elm_box_pack_end(box, frame);
|
elm_box_pack_end(box, frame);
|
||||||
|
|
|
@ -6,7 +6,7 @@ _label_mem(Evas_Object *parent, const char *text)
|
||||||
Evas_Object *label = elm_label_add(parent);
|
Evas_Object *label = elm_label_add(parent);
|
||||||
evas_object_size_hint_weight_set(label, 0, EXPAND);
|
evas_object_size_hint_weight_set(label, 0, EXPAND);
|
||||||
evas_object_size_hint_align_set(label, FILL, FILL);
|
evas_object_size_hint_align_set(label, FILL, FILL);
|
||||||
elm_object_text_set(label, eina_slstr_printf("<bigger>%s</bigger>",text));
|
elm_object_text_set(label, eina_slstr_printf("%s",text));
|
||||||
evas_object_show(label);
|
evas_object_show(label);
|
||||||
|
|
||||||
return label;
|
return label;
|
||||||
|
@ -27,8 +27,8 @@ _progress_add(Evas_Object *parent)
|
||||||
void
|
void
|
||||||
ui_tab_memory_add(Ui *ui)
|
ui_tab_memory_add(Ui *ui)
|
||||||
{
|
{
|
||||||
Evas_Object *parent, *box, *hbox, *frame, *pb, *scroller;
|
Evas_Object *parent, *box, *hbox, *frame, *pb;
|
||||||
Evas_Object *label, *table;
|
Evas_Object *scroller, *border, *rect, *label, *table;
|
||||||
|
|
||||||
parent = ui->content;
|
parent = ui->content;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ ui_tab_memory_add(Ui *ui)
|
||||||
evas_object_hide(box);
|
evas_object_hide(box);
|
||||||
|
|
||||||
ui->mem_activity = hbox = elm_box_add(box);
|
ui->mem_activity = hbox = elm_box_add(box);
|
||||||
evas_object_size_hint_weight_set(hbox, EXPAND, 0);
|
evas_object_size_hint_weight_set(hbox, EXPAND, EXPAND);
|
||||||
evas_object_size_hint_align_set(hbox, FILL, FILL);
|
evas_object_size_hint_align_set(hbox, FILL, FILL);
|
||||||
evas_object_show(hbox);
|
evas_object_show(hbox);
|
||||||
|
|
||||||
|
@ -55,9 +55,6 @@ ui_tab_memory_add(Ui *ui)
|
||||||
elm_scroller_policy_set(scroller,
|
elm_scroller_policy_set(scroller,
|
||||||
ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
|
ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
|
||||||
evas_object_show(scroller);
|
evas_object_show(scroller);
|
||||||
elm_object_content_set(scroller, hbox);
|
|
||||||
elm_object_content_set(frame, scroller);
|
|
||||||
elm_box_pack_end(box, frame);
|
|
||||||
|
|
||||||
box = elm_box_add(ui->content);
|
box = elm_box_add(ui->content);
|
||||||
evas_object_size_hint_align_set(box, FILL, FILL);
|
evas_object_size_hint_align_set(box, FILL, FILL);
|
||||||
|
@ -95,15 +92,28 @@ ui_tab_memory_add(Ui *ui)
|
||||||
elm_table_pack(table, label, 0, 4, 1, 1);
|
elm_table_pack(table, label, 0, 4, 1, 1);
|
||||||
elm_table_pack(table, pb, 1, 4, 1, 1);
|
elm_table_pack(table, pb, 1, 4, 1, 1);
|
||||||
|
|
||||||
frame = elm_frame_add(ui->mem_activity);
|
border = elm_frame_add(parent);
|
||||||
evas_object_size_hint_weight_set(frame, EXPAND, EXPAND);
|
elm_object_style_set(border, "pad_small");
|
||||||
evas_object_size_hint_align_set(frame, FILL, FILL);
|
evas_object_size_hint_weight_set(border, EXPAND, EXPAND);
|
||||||
elm_object_style_set(frame, "pad_huge");
|
evas_object_size_hint_align_set(border, FILL, FILL);
|
||||||
evas_object_show(frame);
|
evas_object_show(border);
|
||||||
|
elm_object_content_set(border, table);
|
||||||
|
|
||||||
elm_box_pack_end(box, table);
|
table = elm_table_add(parent);
|
||||||
elm_object_content_set(frame, box);
|
evas_object_size_hint_weight_set(table, EXPAND, EXPAND);
|
||||||
elm_box_pack_end(ui->mem_activity, frame);
|
evas_object_size_hint_align_set(table, FILL, FILL);
|
||||||
|
evas_object_show(table);
|
||||||
|
|
||||||
|
rect = evas_object_rectangle_add(evas_object_evas_get(parent));
|
||||||
|
evas_object_size_hint_max_set(rect, MISC_MAX_WIDTH, -1);
|
||||||
|
evas_object_size_hint_min_set(rect, MISC_MIN_WIDTH, 1);
|
||||||
|
|
||||||
|
elm_table_pack(table, rect, 0, 0, 1, 1);
|
||||||
|
elm_table_pack(table, border, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
elm_object_content_set(scroller, table);
|
||||||
|
elm_object_content_set(frame, scroller);
|
||||||
|
elm_box_pack_end(ui->mem_view, frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -252,6 +252,7 @@ void
|
||||||
ui_tab_misc_add(Ui *ui)
|
ui_tab_misc_add(Ui *ui)
|
||||||
{
|
{
|
||||||
Evas_Object *parent, *box, *hbox, *frame, *scroller;
|
Evas_Object *parent, *box, *hbox, *frame, *scroller;
|
||||||
|
Evas_Object *table, *border, *rect;
|
||||||
|
|
||||||
parent = ui->content;
|
parent = ui->content;
|
||||||
|
|
||||||
|
@ -262,7 +263,7 @@ ui_tab_misc_add(Ui *ui)
|
||||||
evas_object_hide(box);
|
evas_object_hide(box);
|
||||||
|
|
||||||
ui->misc_activity = hbox = elm_box_add(box);
|
ui->misc_activity = hbox = elm_box_add(box);
|
||||||
evas_object_size_hint_weight_set(hbox, EXPAND, 0);
|
evas_object_size_hint_weight_set(hbox, EXPAND, EXPAND);
|
||||||
evas_object_size_hint_align_set(hbox, FILL, FILL);
|
evas_object_size_hint_align_set(hbox, FILL, FILL);
|
||||||
evas_object_show(hbox);
|
evas_object_show(hbox);
|
||||||
|
|
||||||
|
@ -278,9 +279,28 @@ ui_tab_misc_add(Ui *ui)
|
||||||
elm_scroller_policy_set(scroller,
|
elm_scroller_policy_set(scroller,
|
||||||
ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
|
ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
|
||||||
evas_object_show(scroller);
|
evas_object_show(scroller);
|
||||||
elm_object_content_set(scroller, hbox);
|
|
||||||
|
|
||||||
elm_object_content_set(frame, scroller);
|
border = elm_frame_add(box);
|
||||||
|
elm_object_style_set(border, "pad_small");
|
||||||
|
evas_object_size_hint_weight_set(border, EXPAND, EXPAND);
|
||||||
|
evas_object_size_hint_align_set(border, FILL, FILL);
|
||||||
|
evas_object_show(border);
|
||||||
|
elm_object_content_set(border, hbox);
|
||||||
|
|
||||||
|
table = elm_table_add(parent);
|
||||||
|
evas_object_size_hint_weight_set(table, EXPAND, EXPAND);
|
||||||
|
evas_object_size_hint_align_set(table, FILL, FILL);
|
||||||
|
evas_object_show(table);
|
||||||
|
|
||||||
|
rect = evas_object_rectangle_add(evas_object_rectangle_add(parent));
|
||||||
|
evas_object_size_hint_max_set(rect, MISC_MAX_WIDTH, -1);
|
||||||
|
evas_object_size_hint_min_set(rect, MISC_MIN_WIDTH, 1);
|
||||||
|
|
||||||
|
elm_table_pack(table, rect, 0, 0, 1, 1);
|
||||||
|
elm_table_pack(table, border, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
elm_object_content_set(scroller, table);
|
||||||
|
elm_object_content_set(frame,scroller);
|
||||||
elm_box_pack_end(box, frame);
|
elm_box_pack_end(box, frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#define TAB_BTN_HEIGHT 32
|
#define TAB_BTN_HEIGHT 32
|
||||||
#define BTN_WIDTH 80
|
#define BTN_WIDTH 80
|
||||||
#define BTN_HEIGHT 24
|
#define BTN_HEIGHT 24
|
||||||
|
#define MISC_MAX_WIDTH 800
|
||||||
|
#define MISC_MIN_WIDTH 640
|
||||||
|
|
||||||
Evas_Object *
|
Evas_Object *
|
||||||
evisum_ui_tab_add(Evas_Object *parent, Evas_Object **alias, const char *text,
|
evisum_ui_tab_add(Evas_Object *parent, Evas_Object **alias, const char *text,
|
||||||
|
|
Loading…
Reference in New Issue