forked from enlightenment/efl
gfx: Add size hint fill (EO)
Summary: If widget use both hint_align(HINT_FILL) and hint_max together, there is no way to set to hint_align. See, elementary_test -to 'efl.ui.box' - "Button with a quite long text." button. you can control button position using "Box align" slider, but this is not proper implementation. When there are two widget which have hint_align(HINT_FILL) and hint_max, those positions are determined by box_align rather than hint_align. it means widget align cannot be set individually. To solve this problem, this patch add hint_fill property. in order to avoid conflict with legacy API named evas_object_size_hint_fill_set(), it only works for EO widgets(made by efl_add). Also, EFL_GFX_SIZE_HINT_FILL is removed. @feature Test Plan: elementary_test -to 'efl.ui.box' elementary_test -to 'efl.ui.table' Reviewers: jpeg, Hermet, Jaehyun_Cho, raster, barbieri Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T3912 Differential Revision: https://phab.enlightenment.org/D7409
This commit is contained in:
parent
4858d9eb81
commit
78ae9c0ae0
|
@ -422,13 +422,13 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
o_bg = efl_add(EFL_UI_BG_CLASS, box,
|
||||
efl_file_set(efl_added, buf, NULL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EFL_GFX_SIZE_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack(box, efl_added));
|
||||
|
||||
rdg = rd = efl_add(EFL_UI_RADIO_CLASS, hbox,
|
||||
|
|
|
@ -175,7 +175,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_align_set(efl_added, -1.0, -1.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_table(table, efl_added, 0, TABLE_SIZE + 1, TABLE_SIZE, 1));
|
||||
|
||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
|
|
|
@ -346,7 +346,8 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
box2 = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, -1.0, 0.0));
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE));
|
||||
efl_pack(box, box2);
|
||||
|
||||
/* FIXME: Efl.Ui.Text doesn't work as expected. */
|
||||
|
@ -375,7 +376,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
o = efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||
efl_text_set(efl_added, "Flip"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 1.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, -1.0, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _flip_click, win));
|
||||
efl_pack(box2, o);
|
||||
}
|
||||
|
@ -384,7 +385,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
box2 = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, -1.0, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_pack_padding_set(efl_added, 5, 5, 1),
|
||||
efl_gfx_size_hint_margin_set(efl_added, 5, 5, 5, 5),
|
||||
efl_pack_align_set(efl_added, 0, 0.5));
|
||||
|
@ -453,7 +454,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
box2 = efl_add(EFL_UI_BOX_STACK_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, -1.0, -1.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_align_set(efl_added, 0.5, 0.5));
|
||||
efl_pack(flip, box2);
|
||||
|
||||
|
@ -469,7 +470,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
o = box2 = efl_add(EFL_UI_BOX_STACK_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, -1.0, -1.0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_align_set(efl_added, 0.5, 0.5));
|
||||
efl_pack(flip, box2);
|
||||
|
||||
|
|
|
@ -112,6 +112,30 @@ alignv_slider_cb(void *data, const Efl_Event *event)
|
|||
efl_pack_align_set(box, ah, val);
|
||||
}
|
||||
|
||||
static void
|
||||
alignh_btn_slider_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
double av, val;
|
||||
Eo *win = data, *btn;
|
||||
|
||||
btn = efl_key_wref_get(win, "button");
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(btn, NULL, &av);
|
||||
efl_gfx_size_hint_align_set(btn, val, av);
|
||||
}
|
||||
|
||||
static void
|
||||
alignv_btn_slider_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
double ah, val;
|
||||
Eo *win = data, *btn;
|
||||
|
||||
btn = efl_key_wref_get(win, "button");
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(btn, &ah, NULL);
|
||||
efl_gfx_size_hint_align_set(btn, ah, val);
|
||||
}
|
||||
|
||||
static void
|
||||
flow_check_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
|
@ -245,7 +269,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* weights radio group */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
chk = o = elm_radio_add(win);
|
||||
|
@ -298,7 +323,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* misc */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -352,7 +378,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* user min size setter */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -378,7 +405,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* inner box padding */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -404,7 +432,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* outer margin */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -430,7 +459,8 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
/* Box align */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -466,6 +496,46 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
/* Button align */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
elm_object_text_set(o, "Button align");
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = elm_slider_add(win);
|
||||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_btn_slider_cb, win);
|
||||
elm_slider_min_max_set(o, 0.0, 1.0);
|
||||
elm_slider_step_set(o, 0.1);
|
||||
elm_slider_value_set(o, 0.5);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = elm_slider_add(win);
|
||||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 1);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 0);
|
||||
efl_gfx_size_hint_min_set(o, EINA_SIZE2D(100, 0));
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_btn_slider_cb, win);
|
||||
elm_slider_min_max_set(o, -0.1, 1.0);
|
||||
elm_slider_step_set(o, 0.1);
|
||||
elm_slider_value_set(o, 0.5);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
||||
/* contents */
|
||||
f = elm_frame_add(win);
|
||||
|
@ -483,14 +553,17 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_content_set(f, bx);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Btn1");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Btn1");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 0.5);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button 2");
|
||||
efl_gfx_size_hint_align_set(o, -1, -1);
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Button 2");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -501,15 +574,19 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Min size");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Min size");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 1.0);
|
||||
efl_gfx_size_hint_aspect_set(o, EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 1));
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Quit!");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "Quit!");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, 0.0);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
@ -521,26 +598,33 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button with a quite long text.");
|
||||
efl_gfx_size_hint_align_set(o, -1, -1);
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_key_wref_set(win, "button", o);
|
||||
efl_text_set(o, "Button with a quite long text.");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_max_set(o, EINA_SIZE2D(200, 100));
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "BtnA");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "BtnA");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_gfx_size_hint_aspect_set(o, EFL_GFX_SIZE_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 2));
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "BtnB");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "BtnB");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "BtnC");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, bx);
|
||||
efl_text_set(o, "BtnC");
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
|
||||
dt1 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_HOUR, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MINUTE, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_AMPM, EINA_FALSE),
|
||||
|
@ -70,7 +70,7 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
|
||||
dt2 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_YEAR, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MONTH, EINA_FALSE),
|
||||
efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_DATE, EINA_FALSE),
|
||||
|
@ -81,19 +81,20 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
|
||||
dt3 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, bx,
|
||||
efl_text_set(efl_added, "Editable Clock:"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, 0.0, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0, EVAS_HINT_FILL),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_FALSE, EINA_TRUE),
|
||||
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 25)),
|
||||
efl_pack(bx, efl_added));
|
||||
|
||||
dt4 = efl_add(EFL_UI_CLOCK_CLASS, bx,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_ui_clock_edit_mode_set(efl_added, EINA_TRUE),
|
||||
efl_ui_clock_pause_set(efl_added, EINA_TRUE),
|
||||
efl_pack(bx, efl_added));
|
||||
|
|
|
@ -45,7 +45,8 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
bx = efl_add(EFL_UI_BOX_CLASS, sc,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0),
|
||||
efl_gfx_size_hint_align_set(efl_added, 0.5, 0),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_content_set(sc, efl_added));
|
||||
|
||||
efl_add(EFL_UI_SLIDER_CLASS, bx,
|
||||
|
@ -57,7 +58,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_add(EFL_UI_BUTTON_CLASS, bx,
|
||||
efl_text_set(efl_added, "Vertical"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
|
||||
efl_pack(bx, efl_added));
|
||||
}
|
||||
|
@ -83,7 +84,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_add(EFL_UI_BUTTON_CLASS, bx,
|
||||
efl_text_set(efl_added, "Vertical"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
|
||||
efl_pack(bx, efl_added));
|
||||
}
|
||||
|
@ -100,7 +101,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
|
||||
sc3 = efl_add(EFL_UI_SCROLLER_CLASS, win,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_table(gd, efl_added, 0, 0, 1, 1));
|
||||
|
||||
gd2 = efl_add(EFL_UI_TABLE_CLASS, sc3,
|
||||
|
@ -122,7 +123,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
efl_add(EFL_UI_BUTTON_CLASS, bx,
|
||||
efl_text_set(efl_added, "Vertical"),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, 0.5),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
|
||||
efl_pack(bx, efl_added));
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ content_add(Eo *parent, char *text)
|
|||
efl_file_set(efl_added, buf, "page_layout"),
|
||||
efl_text_set(efl_part(efl_added, "text"), text),
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL));
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE));
|
||||
|
||||
return page;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ test_ui_tab_pager(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
|
|||
|
||||
tp = efl_add(EFL_UI_TAB_PAGER_CLASS, layout,
|
||||
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
|
||||
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
|
||||
efl_gfx_size_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_ui_pager_page_size_set(efl_added, EINA_SIZE2D(-1, -1)),
|
||||
efl_ui_pager_padding_set(efl_added, 20),
|
||||
efl_content_set(efl_part(layout, "tab_pager"), efl_added));
|
||||
|
|
|
@ -38,7 +38,7 @@ weights_cb(void *data, const Efl_Event *event)
|
|||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
case NONE_BUT_FILL:
|
||||
efl_gfx_size_hint_align_set(table, -1, -1);
|
||||
efl_gfx_size_hint_fill_set(table, EINA_TRUE, EINA_TRUE);
|
||||
for (int i = 0; i < 7; i++)
|
||||
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
|
||||
break;
|
||||
|
@ -96,6 +96,26 @@ btnmargins_slider_cb(void *data, const Efl_Event *event)
|
|||
efl_gfx_size_hint_margin_set(data, val, val, val, val);
|
||||
}
|
||||
|
||||
static void
|
||||
alignv_slider_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
{
|
||||
double ax, val;
|
||||
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(objects[1], &ax, NULL);
|
||||
efl_gfx_size_hint_align_set(objects[1], ax, val);
|
||||
}
|
||||
|
||||
static void
|
||||
alignh_slider_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
{
|
||||
double ay, val;
|
||||
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_gfx_size_hint_align_get(objects[1], NULL, &ay);
|
||||
efl_gfx_size_hint_align_set(objects[1], val, ay);
|
||||
}
|
||||
|
||||
static void
|
||||
layout_updated_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
|
@ -205,7 +225,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* weights radio group */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
chk = o = elm_radio_add(win);
|
||||
|
@ -267,7 +288,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* min size setter */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0.5, -1);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -293,7 +314,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* inner box padding */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -319,7 +341,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* outer margin */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 0, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -345,7 +367,8 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
/* button margins */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -368,10 +391,48 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
||||
/* button1 aligns */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
o = elm_label_add(win);
|
||||
elm_object_text_set(o, "Button1 align");
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = elm_slider_add(win);
|
||||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 0);
|
||||
efl_gfx_size_hint_align_set(o, 0.5, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 1);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignv_slider_cb, NULL);
|
||||
elm_slider_min_max_set(o, 0, 1);
|
||||
elm_slider_value_set(o, 0.3);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = elm_slider_add(win);
|
||||
elm_slider_indicator_format_set(o, "%.1f");
|
||||
elm_slider_indicator_show_set(o, 1);
|
||||
elm_slider_horizontal_set(o, 1);
|
||||
efl_gfx_size_hint_align_set(o, -1, -1);
|
||||
efl_gfx_size_hint_weight_set(o, 1, 0);
|
||||
efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, alignh_slider_cb, NULL);
|
||||
elm_slider_min_max_set(o, 0, 1);
|
||||
elm_slider_value_set(o, 0.3);
|
||||
efl_pack(bx, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
/* ro info */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
|
||||
|
@ -411,45 +472,47 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
efl_gfx_color_set(o, 64, 96, 128, 255);
|
||||
efl_pack_table(table, o, 0, 0, 3, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button 1");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 1");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_size_hint_align_set(o, 0.3, 0.3);
|
||||
efl_gfx_size_hint_max_set(o, EINA_SIZE2D(100, 100));
|
||||
efl_pack_table(table, o, 0, 0, 1, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button 2");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 2");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 1, 0, 1, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button 3");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 3");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 2, 0, 1, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button 4");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 4");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 0, 1, 2, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button 5");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 5");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 2, 1, 1, 2);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
objects[i++] = o = elm_button_add(win);
|
||||
elm_object_text_set(o, "Button 6");
|
||||
objects[i++] = o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, "Button 6");
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_TRUE, EINA_TRUE);
|
||||
efl_pack_table(table, o, 0, 2, 2, 1);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
|
@ -475,8 +538,10 @@ static void
|
|||
append_cb(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||
{
|
||||
Eo *table = data;
|
||||
Eo *o = elm_button_add(table);
|
||||
elm_object_text_set(o, btn_text("appended"));
|
||||
Eo *o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text("appended"));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
elm_object_tooltip_text_set(o, "Click to unpack");
|
||||
efl_pack_end(table, o);
|
||||
|
@ -548,7 +613,8 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
/* ro info */
|
||||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_gfx_size_hint_align_set(bx, 0, -1);
|
||||
efl_gfx_size_hint_align_set(bx, 0, 0.5);
|
||||
efl_gfx_size_hint_fill_set(bx, EINA_FALSE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bx, 1, 1);
|
||||
efl_pack(hbox, bx);
|
||||
efl_gfx_entity_visible_set(bx, 1);
|
||||
|
@ -586,20 +652,26 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
elm_object_content_set(f, table);
|
||||
efl_gfx_entity_visible_set(table, 1);
|
||||
|
||||
o = elm_button_add(win);
|
||||
elm_object_text_set(o, btn_text(NULL));
|
||||
o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text(NULL));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
efl_pack(table, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = elm_button_add(win);
|
||||
elm_object_text_set(o, btn_text(NULL));
|
||||
o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text(NULL));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
efl_pack(table, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
||||
o = elm_button_add(win);
|
||||
elm_object_text_set(o, btn_text(NULL));
|
||||
o = efl_add(EFL_UI_BUTTON_CLASS, table);
|
||||
efl_text_set(o, btn_text(NULL));
|
||||
efl_gfx_size_hint_weight_set(o, 0, 0);
|
||||
efl_gfx_size_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
|
||||
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
|
||||
efl_pack(table, o);
|
||||
efl_gfx_entity_visible_set(o, 1);
|
||||
|
|
|
@ -100,7 +100,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
box = elm_box_add(win);
|
||||
elm_box_horizontal_set(box, EINA_FALSE);
|
||||
efl_gfx_size_hint_weight_set(box, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(box, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(box, EINA_TRUE);
|
||||
|
||||
txtpath = efl_add(EFL_UI_TEXTPATH_CLASS, win);
|
||||
|
@ -115,7 +115,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(hbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(hbox, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(hbox, EINA_TRUE);
|
||||
elm_box_pack_end(box, hbox);
|
||||
|
||||
|
@ -142,7 +142,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(hbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(hbox, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(hbox, EINA_TRUE);
|
||||
elm_box_pack_end(box, hbox);
|
||||
|
||||
|
@ -150,7 +150,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
elm_object_text_set(sld, "Angle");
|
||||
elm_slider_min_max_set(sld, 0, 360);
|
||||
elm_slider_value_set(sld, 0);
|
||||
efl_gfx_size_hint_align_set(sld, 0.5, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_align_set(sld, 0.5, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_weight_set(sld, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_min_set(sld, EINA_SIZE2D(150, 0));
|
||||
efl_event_callback_add(sld, EFL_UI_SLIDER_EVENT_CHANGED, _angle_changed_cb, txtpath);
|
||||
|
@ -162,7 +162,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
elm_object_text_set(sld, "Slice No");
|
||||
elm_slider_min_max_set(sld, 20, 300);
|
||||
elm_slider_value_set(sld, 99);
|
||||
efl_gfx_size_hint_align_set(sld, 0.5, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_align_set(sld, 0.5, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_weight_set(sld, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_min_set(sld, EINA_SIZE2D(150, 0));
|
||||
efl_event_callback_add(sld, EFL_UI_SLIDER_EVENT_CHANGED, _slice_no_changed_cb, txtpath);
|
||||
|
@ -173,7 +173,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(hbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(hbox, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(hbox, EINA_TRUE);
|
||||
elm_box_pack_end(box, hbox);
|
||||
|
||||
|
|
|
@ -100,7 +100,8 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
up.autorepeat_initial_timeout_set(1.0);
|
||||
up.autorepeat_gap_timeout_set(0.5);
|
||||
up.hint_weight_set(EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
up.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.0);
|
||||
up.hint_fill_set(true, false);
|
||||
up.hint_align_set(0.5, 0.0);
|
||||
box.pack_end(up);
|
||||
|
||||
auto wmid = mid._get_wref();
|
||||
|
@ -180,7 +181,8 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
left.autorepeat_initial_timeout_set(1.0);
|
||||
left.autorepeat_gap_timeout_set(0.5);
|
||||
left.hint_weight_set(0.0, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
left.hint_align_set(0.0, EFL_GFX_SIZE_HINT_FILL);
|
||||
left.hint_fill_set(false, true);
|
||||
left.hint_align_set(0.0, 0.5);
|
||||
box_inferior.pack_end(left);
|
||||
efl::eolian::event_add(efl::ui::Clickable::repeated_event, left, btn_cursors_move);
|
||||
efl::eolian::event_add(efl::ui::Clickable::unpressed_event, left, btn_cursors_release);
|
||||
|
@ -199,7 +201,8 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
right.autorepeat_initial_timeout_set(1.0);
|
||||
right.autorepeat_gap_timeout_set(0.5);
|
||||
right.hint_weight_set(0.0, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
right.hint_align_set(0.0, EFL_GFX_SIZE_HINT_FILL);
|
||||
right.hint_fill_set(false, true);
|
||||
right.hint_align_set(0.0, 0.5);
|
||||
box_inferior.pack_end(right);
|
||||
efl::eolian::event_add(efl::ui::Clickable::repeated_event, right, btn_cursors_move);
|
||||
efl::eolian::event_add(efl::ui::Clickable::unpressed_event, right, btn_cursors_release);
|
||||
|
@ -212,7 +215,8 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
down.autorepeat_initial_timeout_set(1.0);
|
||||
down.autorepeat_gap_timeout_set(0.5);
|
||||
down.hint_weight_set(EFL_GFX_SIZE_HINT_EXPAND, 0.0);
|
||||
down.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.0);
|
||||
down.hint_fill_set(true, false);
|
||||
down.hint_align_set(0.5, 0.0);
|
||||
box.pack_end(down);
|
||||
efl::eolian::event_add(efl::ui::Clickable::repeated_event, down, btn_cursors_move);
|
||||
efl::eolian::event_add(efl::ui::Clickable::unpressed_event, down, btn_cursors_release);
|
||||
|
|
|
@ -34,7 +34,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
|
||||
::elm::Calendar cal2(instantiate, win);
|
||||
//cal2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
//cal2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
//cal2.size_hint_fill_set(true, true);
|
||||
current_time = time(NULL) +2 * SECS_DAY;
|
||||
localtime_r(¤t_time, &selected_time);
|
||||
// cal2.selected_time_set(&selected_time);
|
||||
|
|
|
@ -24,7 +24,7 @@ EoGenerate(const Efl_Class *klass, Eo *parent, Efl_Ui_Dir dir)
|
|||
Eo* obj = efl_add(klass, parent);
|
||||
if (dir != EFL_UI_DIR_DEFAULT) efl_ui_direction_set(obj, dir);
|
||||
efl_gfx_size_hint_weight_set(obj, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(obj, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(obj, EINA_TRUE, EINA_TRUE);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ elm_main(int argc, char **argv)
|
|||
|
||||
Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, box);
|
||||
efl_gfx_size_hint_weight_set(btn, 0.3, 0.3);
|
||||
efl_gfx_size_hint_align_set(btn, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(btn, EINA_TRUE, EINA_TRUE);
|
||||
efl_text_set(btn, "BUTTON");
|
||||
efl_pack_end(box, btn);
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ elm_main(int argc, char **argv)
|
|||
wbox = efl_add(EFL_UI_BOX_CLASS, win);
|
||||
efl_ui_direction_set(wbox, EFL_UI_DIR_VERTICAL);
|
||||
efl_gfx_size_hint_weight_set(wbox, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(wbox, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(wbox, EINA_TRUE, EINA_TRUE);
|
||||
|
||||
if ((argv[1] != NULL) &&
|
||||
(!strcmp(argv[1], "empty")))
|
||||
|
@ -324,4 +324,4 @@ elm_main(int argc, char **argv)
|
|||
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
||||
ELM_MAIN()
|
||||
|
|
|
@ -22,7 +22,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
win.content_set(bx);
|
||||
|
||||
efl::ui::Slider sl(instantiate, win);
|
||||
sl.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sl.hint_fill_set(true, false);
|
||||
bx.pack_end(sl);
|
||||
|
||||
efl::ui::Slider sl2(instantiate, win);
|
||||
|
@ -38,37 +38,37 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
efl::eo::downcast<efl::Content>(sl2.part_get("elm.swallow.end"))
|
||||
.content_set(ic2);
|
||||
|
||||
sl2.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sl2.hint_fill_set(true, false);
|
||||
bx.pack_end(sl2);
|
||||
|
||||
efl::ui::Slider sl3(instantiate, win);
|
||||
sl3.range_value_set(1);
|
||||
sl3.hint_min_set({220, 0});
|
||||
sl3.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sl3.hint_fill_set(true, false);
|
||||
bx.pack_end(sl3);
|
||||
|
||||
efl::ui::Slider sl4(instantiate, win);
|
||||
sl4.range_min_max_set(0, 100);
|
||||
sl4.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sl4.hint_fill_set(true, false);
|
||||
bx.pack_end(sl4);
|
||||
|
||||
efl::ui::Slider sl5(instantiate, win);
|
||||
sl5.range_min_max_set(0, 100);
|
||||
sl5.range_step_set(1);
|
||||
sl5.direction_set(EFL_UI_DIR_UP);
|
||||
sl5.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sl5.hint_fill_set(true, false);
|
||||
sl5.hint_min_set({0, 120});
|
||||
bx.pack_end(sl5);
|
||||
|
||||
efl::ui::Slider sl6(instantiate, win);
|
||||
sl6.direction_set(EFL_UI_DIR_HORIZONTAL);
|
||||
sl6.range_min_max_set(0, 10);
|
||||
sl6.hint_align_set(0.5, EFL_GFX_SIZE_HINT_FILL);
|
||||
sl6.hint_fill_set(false, true);
|
||||
sl6.hint_weight_set(0, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
bx.pack_end(sl6);
|
||||
|
||||
efl::ui::Slider sl7(instantiate, win);
|
||||
sl7.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sl7.hint_fill_set(true, false);
|
||||
bx.pack_end(sl7);
|
||||
|
||||
auto changed = std::bind ( [] (efl::ui::Slider obj)
|
||||
|
|
|
@ -23,12 +23,12 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
win.content_set(bx);
|
||||
|
||||
elm::Spinner sp(instantiate, win);
|
||||
sp.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sp.hint_fill_set(true, false);
|
||||
bx.pack_end(sp);
|
||||
|
||||
elm::Spinner sp2(instantiate, win);
|
||||
sp2.label_format_set("Percentage %%%1.2f something");
|
||||
sp2.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sp2.hint_fill_set(true, false);
|
||||
bx.pack_end(sp2);
|
||||
|
||||
elm::Spinner sp3(instantiate, win);
|
||||
|
@ -36,18 +36,18 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
sp3.step_set(1.5);
|
||||
sp3.wrap_set(true);
|
||||
sp3.min_max_set(-50.0, 250.0);
|
||||
sp3.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sp3.hint_fill_set(true, false);
|
||||
bx.pack_end(sp3);
|
||||
|
||||
elm::Spinner sp4(instantiate, win);
|
||||
sp4.style_set("vertical");
|
||||
sp4.interval_set(0.2);
|
||||
sp4.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sp4.hint_fill_set(true, false);
|
||||
bx.pack_end(sp4);
|
||||
|
||||
elm::Spinner sp5(instantiate, win);
|
||||
sp5.editable_set(false);
|
||||
sp5.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sp5.hint_fill_set(true, false);
|
||||
bx.pack_end(sp5);
|
||||
|
||||
elm::Spinner sp6(instantiate, win);
|
||||
|
@ -65,11 +65,11 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|||
sp6.special_value_add(10, "October");
|
||||
sp6.special_value_add(11, "November");
|
||||
sp6.special_value_add(12, "December");
|
||||
sp6.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sp6.hint_fill_set(true, false);
|
||||
bx.pack_end(sp6);
|
||||
|
||||
elm::Spinner sp7(instantiate, win);
|
||||
sp7.hint_align_set(EFL_GFX_SIZE_HINT_FILL, 0.5);
|
||||
sp7.hint_fill_set(true, false);
|
||||
bx.pack_end(sp7);
|
||||
sp7.editable_set(true);
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ elm_main(int argc, char* argv[])
|
|||
elm::Toolbar toolbar_1(instantiate, win_1);
|
||||
toolbar_1.shrink_mode_set(ELM_TOOLBAR_SHRINK_MENU);
|
||||
toolbar_1.hint_weight_set(0, 0);
|
||||
toolbar_1.hint_align_set(-1, 0);
|
||||
toolbar_1.hint_align_set(0.5, 0);
|
||||
toolbar_1.hint_fill_set(ture, false);
|
||||
toolbar_1.menu_parent_set(win_1);
|
||||
elm::toolbar::Item item_1 = efl::eo::downcast<elm::toolbar::Item>
|
||||
(toolbar_1.item_append("document-print", "Hello", nullptr, nullptr));
|
||||
|
@ -71,7 +72,7 @@ elm_main(int argc, char* argv[])
|
|||
box_1.pack_end(toolbar_1);
|
||||
elm::Widget table_1(elm_table_add(win_1._eo_ptr()));
|
||||
table_1.hint_weight_set(0.0, 1.0);
|
||||
table_1.hint_align_set(-1, -1);
|
||||
table_1.hint_fill_set(true, true);
|
||||
table_1.visible_set(true);
|
||||
|
||||
elm::Widget photo_1(elm_photo_add(win_1._eo_ptr()));
|
||||
|
|
|
@ -3,8 +3,6 @@ import efl_gfx_types;
|
|||
|
||||
const Efl.Gfx.Size_Hint_Expand: double = 1.0;
|
||||
[[Use with @Efl.Gfx.Size_Hint.hint_weight.]]
|
||||
const Efl.Gfx.Size_Hint_Fill: double = -1.0;
|
||||
[[Special value for @Efl.Gfx.Size_Hint.hint_align.]]
|
||||
|
||||
interface Efl.Gfx.Size_Hint
|
||||
{
|
||||
|
@ -203,16 +201,7 @@ interface Efl.Gfx.Size_Hint
|
|||
|
||||
These are hints on how to align an object inside the
|
||||
boundaries of a container/manager. Accepted values are in
|
||||
the 0.0 to 1.0 range, with the special value @Efl.Gfx.Size_Hint_Fill
|
||||
used to specify "justify" or "fill" by some users. In this
|
||||
case, maximum size hints should be enforced with higher
|
||||
priority, if they are set. Also, any padding hint set on
|
||||
objects should add up to the alignment space on the final
|
||||
scene composition.
|
||||
|
||||
See documentation of possible users: in Evas, they are the
|
||||
@Efl.Ui.Box "box" and @Efl.Ui.Table "table"
|
||||
smart objects.
|
||||
the 0.0 to 1.0 range.
|
||||
|
||||
For the horizontal component, 0.0 means to the left, 1.0
|
||||
means to the right. Analogously, for the vertical component,
|
||||
|
@ -227,10 +216,33 @@ interface Efl.Gfx.Size_Hint
|
|||
@image html alignment-hints.png
|
||||
*/
|
||||
values {
|
||||
x: double; [[Double, ranging from 0.0 to 1.0 or with the special value
|
||||
@Efl.Gfx.Size_Hint_Fill, to use as horizontal alignment hint.]]
|
||||
y: double; [[Double, ranging from 0.0 to 1.0 or with the special value
|
||||
@Efl.Gfx.Size_Hint_Fill, to use as vertical alignment hint.]]
|
||||
x: double; [[Double, ranging from 0.0 to 1.0.]]
|
||||
y: double; [[Double, ranging from 0.0 to 1.0.]]
|
||||
}
|
||||
}
|
||||
@property hint_fill {
|
||||
[[Hints for an object's fill property that used to specify "justify"
|
||||
or "fill" by some users. @.hint_fill specify whether to fill
|
||||
the space inside the boundaries of a container/manager.
|
||||
|
||||
Maximum size hints should be enforced with higher
|
||||
priority, if they are set. Also, any @.hint_margin set on
|
||||
objects should add up to the object space on the final
|
||||
scene composition.
|
||||
|
||||
See documentation of possible users: in Evas, they are the
|
||||
@Efl.Ui.Box "box" and @Efl.Ui.Table "table" smart objects.
|
||||
|
||||
This is not a size enforcement in any way, it's just a hint
|
||||
that should be used whenever appropriate.
|
||||
|
||||
Note: Default fill hint values are true, for both axes.
|
||||
]]
|
||||
values {
|
||||
x: bool; [[$true if to fill the object space, $false otherwise,
|
||||
to use as horizontal fill hint.]]
|
||||
y: bool; [[$true if to fill the object space, $false otherwise,
|
||||
to use as vertical fill hint.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,9 +123,6 @@ _efl_ui_box_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED
|
|||
|
||||
elm_widget_can_focus_set(obj, EINA_FALSE);
|
||||
elm_widget_highlight_ignore_set(obj, EINA_TRUE);
|
||||
|
||||
// new defaults: fill - no expand
|
||||
evas_object_size_hint_align_set(obj, -1, -1);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -12,6 +12,7 @@ struct _Item_Calc
|
|||
Evas_Object *obj;
|
||||
double weight[2];
|
||||
double align[2];
|
||||
Eina_Bool fill[2];
|
||||
Eina_Size2D max, want, aspect;
|
||||
int pad[4];
|
||||
Efl_Gfx_Size_Hint_Aspect aspect_type;
|
||||
|
@ -76,10 +77,41 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
|||
efl_gfx_size_hint_weight_get(o, &item->weight[0], &item->weight[1]);
|
||||
efl_gfx_size_hint_align_get(o, &item->align[0], &item->align[1]);
|
||||
efl_gfx_size_hint_margin_get(o, &item->pad[0], &item->pad[1], &item->pad[2], &item->pad[3]);
|
||||
efl_gfx_size_hint_fill_get(o, &item->fill[0], &item->fill[1]);
|
||||
item->max = efl_gfx_size_hint_max_get(o);
|
||||
item->want = efl_gfx_size_hint_combined_min_get(o);
|
||||
efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect);
|
||||
|
||||
if (item->weight[0] < 0) item->weight[0] = 0;
|
||||
if (item->weight[1] < 0) item->weight[1] = 0;
|
||||
|
||||
if (EINA_DBL_EQ(item->align[0], -1))
|
||||
{
|
||||
item->align[0] = 0.5;
|
||||
item->fill[0] = EINA_TRUE;
|
||||
}
|
||||
else if (item->align[0] < 0)
|
||||
{
|
||||
item->align[0] = 0;
|
||||
}
|
||||
if (EINA_DBL_EQ(item->align[1], -1))
|
||||
{
|
||||
item->align[1] = 0.5;
|
||||
item->fill[1] = EINA_TRUE;
|
||||
}
|
||||
else if (item->align[1] < 0)
|
||||
{
|
||||
item->align[1] = 0;
|
||||
}
|
||||
if (item->align[0] > 1) item->align[0] = 1;
|
||||
if (item->align[1] > 1) item->align[1] = 1;
|
||||
|
||||
if (item->want.w < 0) item->want.w = 0;
|
||||
if (item->want.h < 0) item->want.h = 0;
|
||||
|
||||
if (item->max.w < 0) item->max.w = INT_MAX;
|
||||
if (item->max.h < 0) item->max.h = INT_MAX;
|
||||
|
||||
if (item->aspect.w <= 0 || item->aspect.h <= 0)
|
||||
{
|
||||
if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL)
|
||||
|
@ -102,7 +134,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
|||
|
||||
if (horiz)
|
||||
{
|
||||
if ((item->align[1] < 0) && (h < boxh))
|
||||
if (item->fill[1] && (h < boxh))
|
||||
{
|
||||
double w1, h1;
|
||||
h1 = item->max.h > 0 ? MIN(boxh, item->max.h) : boxh;
|
||||
|
@ -113,7 +145,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((item->align[0] < 0) && (w < boxw))
|
||||
if (item->fill[0] && (w < boxw))
|
||||
{
|
||||
double w1, h1;
|
||||
w1 = item->max.w > 0 ? MIN(boxw, item->max.w) : boxw;
|
||||
|
@ -125,20 +157,6 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
|||
item->want.w = w;
|
||||
item->want.h = h;
|
||||
}
|
||||
|
||||
if (item->weight[0] < 0) item->weight[0] = 0;
|
||||
if (item->weight[1] < 0) item->weight[1] = 0;
|
||||
|
||||
if (item->align[0] < 0) item->align[0] = -1;
|
||||
if (item->align[1] < 0) item->align[1] = -1;
|
||||
if (item->align[0] > 1) item->align[0] = 1;
|
||||
if (item->align[1] > 1) item->align[1] = 1;
|
||||
|
||||
if (item->want.w < 0) item->want.w = 0;
|
||||
if (item->want.h < 0) item->want.h = 0;
|
||||
|
||||
if (item->max.w < 0) item->max.w = INT_MAX;
|
||||
if (item->max.h < 0) item->max.h = INT_MAX;
|
||||
if (item->max.w < item->want.w) item->max.w = item->want.w;
|
||||
if (item->max.h < item->want.h) item->max.h = item->want.h;
|
||||
|
||||
|
@ -319,12 +337,12 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
|||
w = w - item->pad[0] - item->pad[1];
|
||||
h = h - item->pad[2] - item->pad[3];
|
||||
|
||||
if (item->align[0] < 0)
|
||||
if (item->fill[0])
|
||||
x = cx + (cw - w) * 0.5 + item->pad[0];
|
||||
else
|
||||
x = cx + (cw - w) * item->align[0] + item->pad[0];
|
||||
|
||||
if (item->align[1] < 0)
|
||||
if (item->fill[1])
|
||||
y = cy + (ch - h) * 0.5 + item->pad[2];
|
||||
else
|
||||
y = cy + (ch - h) * item->align[1] + item->pad[2];
|
||||
|
@ -335,15 +353,9 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
|||
if (item->max.w < INT_MAX)
|
||||
{
|
||||
w = MIN(MAX(item->want.w - item->pad[0] - item->pad[1], item->max.w), cw);
|
||||
if (item->align[0] < 0)
|
||||
{
|
||||
// bad case: fill+max are not good together
|
||||
x = cx + ((cw - w) * box_align[0]) + item->pad[0];
|
||||
}
|
||||
else
|
||||
x = cx + ((cw - w) * item->align[0]) + item->pad[0];
|
||||
x = cx + ((cw - w) * item->align[0]) + item->pad[0];
|
||||
}
|
||||
else if (item->align[0] < 0)
|
||||
else if (item->fill[0])
|
||||
{
|
||||
// fill x
|
||||
w = cw - item->pad[0] - item->pad[1];
|
||||
|
@ -362,15 +374,9 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
|
|||
if (item->max.h < INT_MAX)
|
||||
{
|
||||
h = MIN(MAX(item->want.h - item->pad[2] - item->pad[3], item->max.h), ch);
|
||||
if (item->align[1] < 0)
|
||||
{
|
||||
// bad case: fill+max are not good together
|
||||
y = cy + ((ch - h) * box_align[1]) + item->pad[2];
|
||||
}
|
||||
else
|
||||
y = cy + ((ch - h) * item->align[1]) + item->pad[2];
|
||||
y = cy + ((ch - h) * item->align[1]) + item->pad[2];
|
||||
}
|
||||
else if (item->align[1] < 0)
|
||||
else if (item->fill[1])
|
||||
{
|
||||
// fill y
|
||||
h = ch - item->pad[2] - item->pad[3];
|
||||
|
|
|
@ -56,12 +56,14 @@ _item_size_calc(Efl_Ui_List_View_Precise_Layouter_Data *pd, Efl_Ui_List_View_Lay
|
|||
{
|
||||
int boxx, boxy, boxw, boxh, boxl, boxr, boxt, boxb, pad[4];
|
||||
double align[2];
|
||||
Eina_Bool fill[2];
|
||||
Eina_Size2D max;
|
||||
|
||||
efl_gfx_size_hint_margin_get(item->layout, &pad[0], &pad[1], &pad[2], &pad[3]);
|
||||
evas_object_geometry_get(pd->modeler, &boxx, &boxy, &boxw, &boxh);
|
||||
efl_gfx_size_hint_margin_get(pd->modeler, &boxl, &boxr, &boxt, &boxb);
|
||||
efl_gfx_size_hint_align_get(item->layout, &align[0], &align[1]);
|
||||
efl_gfx_size_hint_fill_get(item->layout, &fill[0], &fill[1]);
|
||||
max = efl_gfx_size_hint_max_get(item->layout);
|
||||
|
||||
// box outer margin
|
||||
|
@ -70,8 +72,25 @@ _item_size_calc(Efl_Ui_List_View_Precise_Layouter_Data *pd, Efl_Ui_List_View_Lay
|
|||
boxx += boxl;
|
||||
boxy += boxt;
|
||||
|
||||
if (align[0] < 0) align[0] = -1;
|
||||
if (align[1] < 0) align[1] = -1;
|
||||
if (EINA_DBL_EQ(align[0], -1))
|
||||
{
|
||||
align[0] = 0.5;
|
||||
fill[0] = EINA_TRUE;
|
||||
}
|
||||
else if (align[0] < 0)
|
||||
{
|
||||
align[0] = 0;
|
||||
}
|
||||
if (EINA_DBL_EQ(align[1], -1))
|
||||
{
|
||||
align[1] = 0.5;
|
||||
fill[1] = EINA_TRUE;
|
||||
}
|
||||
else if (align[1] < 0)
|
||||
{
|
||||
align[1] = 0;
|
||||
}
|
||||
|
||||
if (align[0] > 1) align[0] = 1;
|
||||
if (align[1] > 1) align[1] = 1;
|
||||
|
||||
|
@ -86,7 +105,7 @@ _item_size_calc(Efl_Ui_List_View_Precise_Layouter_Data *pd, Efl_Ui_List_View_Lay
|
|||
item->size.w = MIN(MAX(item->min.w - pad[0] - pad[1], max.w), boxw);
|
||||
item->pos.x = boxx + pad[0];
|
||||
}
|
||||
else if (align[0] < 0)
|
||||
else if (fill[0])
|
||||
{
|
||||
// fill x
|
||||
item->size.w = boxw - pad[0] - pad[1];
|
||||
|
@ -104,7 +123,7 @@ _item_size_calc(Efl_Ui_List_View_Precise_Layouter_Data *pd, Efl_Ui_List_View_Lay
|
|||
item->size.h = MIN(MAX(item->min.h - pad[2] - pad[3], max.h), boxh);
|
||||
item->pos.y = boxy + pad[2];
|
||||
}
|
||||
else if (align[1] < 0)
|
||||
else if (fill[1])
|
||||
{
|
||||
// fill y
|
||||
item->size.h = item->min.h - pad[2] - pad[3];
|
||||
|
|
|
@ -161,7 +161,7 @@ _efl_ui_scroll_alert_popup_content_set(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *
|
|||
|
||||
//Content should have expand propeties since the scroller is not layout layer
|
||||
efl_gfx_size_hint_weight_set(pd->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(pd->content, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(pd->content, EINA_TRUE, EINA_TRUE);
|
||||
|
||||
efl_content_set(pd->scroller, pd->content);
|
||||
}
|
||||
|
|
|
@ -843,16 +843,18 @@ _box_layout_cb(Evas_Object *o,
|
|||
Eina_Size2D obj_min;
|
||||
Evas_Coord ww, hh, ow, oh;
|
||||
double wx, wy;
|
||||
int fw, fh;
|
||||
Eina_Bool fx, fy;
|
||||
|
||||
obj = opt->obj;
|
||||
evas_object_size_hint_align_get(obj, &ax, &ay);
|
||||
evas_object_size_hint_weight_get(obj, &wx, &wy);
|
||||
efl_gfx_size_hint_fill_get(obj, &fx, &fy);
|
||||
obj_min = efl_gfx_size_hint_combined_min_get(obj);
|
||||
|
||||
fw = fh = EINA_FALSE;
|
||||
if (EINA_DBL_EQ(ax, -1)) {fw = 1; ax = 0.5; }
|
||||
if (EINA_DBL_EQ(ay, -1)) {fh = 1; ay = 0.5; }
|
||||
if (EINA_DBL_EQ(ax, -1)) { fx = 1; ax = 0.5; }
|
||||
else if (ax < 0) { ax = 0.0; }
|
||||
if (EINA_DBL_EQ(ay, -1)) { fy = 1; ay = 0.5; }
|
||||
else if (ay < 0) { ay = 0.0; }
|
||||
if (rtl) ax = 1.0 - ax;
|
||||
|
||||
ww = obj_min.w;
|
||||
|
@ -864,9 +866,9 @@ _box_layout_cb(Evas_Object *o,
|
|||
hh = lineh;
|
||||
|
||||
ow = obj_min.w;
|
||||
if (fw) ow = ww;
|
||||
if (fx) ow = ww;
|
||||
oh = obj_min.h;
|
||||
if (fh) oh = hh;
|
||||
if (fy) oh = hh;
|
||||
|
||||
linew += ww;
|
||||
if (linew > r.w && l != priv->children)
|
||||
|
@ -941,7 +943,7 @@ _view_init(Evas_Object *obj, Efl_Ui_Tags_Data *sd)
|
|||
efl_gfx_size_hint_min_set(sd->entry, EINA_SIZE2D(MIN_W_ENTRY, 0));
|
||||
evas_object_size_hint_weight_set
|
||||
(sd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(sd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(sd->entry, EINA_TRUE, EINA_TRUE);
|
||||
|
||||
elm_box_pack_end(sd->box, sd->entry);
|
||||
|
||||
|
|
|
@ -7385,7 +7385,7 @@ _elm_win_bg_set(Efl_Ui_Win_Data *sd, Eo *bg)
|
|||
}
|
||||
}
|
||||
efl_gfx_entity_visible_set(bg, 1);
|
||||
efl_gfx_size_hint_align_set(bg, -1, -1);
|
||||
efl_gfx_size_hint_fill_set(bg, EINA_TRUE, EINA_TRUE);
|
||||
efl_gfx_size_hint_weight_set(bg, 1, 1);
|
||||
efl_wref_add(bg, &sd->bg);
|
||||
return EINA_TRUE;
|
||||
|
|
|
@ -1891,7 +1891,6 @@ _palette_box_prepare(Eo *o)
|
|||
{
|
||||
efl_ui_direction_set(o, EFL_UI_DIR_HORIZONTAL);
|
||||
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_gfx_entity_visible_set(o, EINA_FALSE);
|
||||
}
|
||||
|
||||
|
@ -1910,6 +1909,7 @@ _create_colorpalette(Evas_Object *obj)
|
|||
if (elm_widget_is_legacy(obj))
|
||||
{
|
||||
sd->palette_box = elm_legacy_add(EFL_UI_BOX_FLOW_CLASS, obj);
|
||||
evas_object_size_hint_align_set(sd->palette_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -608,6 +608,7 @@ abstract Efl.Canvas.Object (Efl.Loop_Consumer, Efl.Gfx.Entity, Efl.Gfx.Color, Ef
|
|||
Efl.Gfx.Size_Hint.hint_max { get; set; }
|
||||
Efl.Gfx.Size_Hint.hint_margin { get; set; }
|
||||
Efl.Gfx.Size_Hint.hint_weight { get; set; }
|
||||
Efl.Gfx.Size_Hint.hint_fill { get; set; }
|
||||
Efl.Gfx.Entity.scale { set; get; }
|
||||
Efl.Input.Interface.seat_event_filter { get; set; }
|
||||
Efl.Loop_Consumer.loop { get; }
|
||||
|
|
|
@ -325,9 +325,6 @@ _efl_canvas_object_efl_object_finalize(Eo *eo_obj, Evas_Object_Protected_Data *o
|
|||
if (!obj->legacy.weight_set)
|
||||
efl_gfx_size_hint_weight_set(eo_obj, 1.0, 1.0);
|
||||
|
||||
if (!obj->legacy.align_set)
|
||||
efl_gfx_size_hint_align_set(eo_obj, -1.0, -1.0);
|
||||
|
||||
if (obj->legacy.visible_set /* && ... */)
|
||||
{
|
||||
obj->legacy.finalized = EINA_TRUE;
|
||||
|
@ -1605,6 +1602,8 @@ _evas_object_size_hint_alloc(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protec
|
|||
obj->size_hints->max.h = -1;
|
||||
obj->size_hints->align.x = 0.5;
|
||||
obj->size_hints->align.y = 0.5;
|
||||
obj->size_hints->fill.x = 1;
|
||||
obj->size_hints->fill.y = 1;
|
||||
obj->size_hints->dispmode = EVAS_DISPLAY_MODE_NONE;
|
||||
}
|
||||
|
||||
|
@ -1830,7 +1829,6 @@ _efl_canvas_object_efl_gfx_size_hint_hint_align_set(Eo *eo_obj, Evas_Object_Prot
|
|||
|
||||
EVAS_OBJECT_DATA_VALID_CHECK(obj);
|
||||
evas_object_async_block(obj);
|
||||
if (!obj->legacy.align_set) obj->legacy.align_set = 1;
|
||||
if (EINA_UNLIKELY(!obj->size_hints))
|
||||
{
|
||||
if (EINA_DBL_EQ(x, 0.5) && EINA_DBL_EQ(y, 0.5)) return;
|
||||
|
@ -1920,6 +1918,49 @@ _efl_canvas_object_efl_gfx_size_hint_hint_margin_set(Eo *eo_obj, Evas_Object_Pro
|
|||
evas_object_inform_call_changed_size_hints(eo_obj, obj);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_canvas_object_efl_gfx_size_hint_hint_fill_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool *x, Eina_Bool *y)
|
||||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (x) *x = EINA_TRUE;
|
||||
if (y) *y = EINA_TRUE;
|
||||
return;
|
||||
}
|
||||
if (x) *x = obj->size_hints->fill.x;
|
||||
if (y) *y = obj->size_hints->fill.y;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_canvas_object_efl_gfx_size_hint_hint_fill_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool x, Eina_Bool y)
|
||||
{
|
||||
if (obj->delete_me)
|
||||
return;
|
||||
|
||||
if (obj->legacy.ctor)
|
||||
{
|
||||
ERR("fill_set() not supported. use align_set() with EVAS_HINT_FILL instead.");
|
||||
return;
|
||||
}
|
||||
|
||||
EVAS_OBJECT_DATA_VALID_CHECK(obj);
|
||||
evas_object_async_block(obj);
|
||||
|
||||
x = !!x;
|
||||
y = !!y;
|
||||
|
||||
if (EINA_UNLIKELY(!obj->size_hints))
|
||||
{
|
||||
if (x && y) return;
|
||||
_evas_object_size_hint_alloc(eo_obj, obj);
|
||||
}
|
||||
if ((obj->size_hints->fill.x == x) && (obj->size_hints->fill.y == y)) return;
|
||||
obj->size_hints->fill.x = x;
|
||||
obj->size_hints->fill.y = y;
|
||||
|
||||
evas_object_inform_call_changed_size_hints(eo_obj, obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_show(Evas_Object *eo_obj)
|
||||
{
|
||||
|
@ -2331,6 +2372,7 @@ _efl_canvas_object_efl_object_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Dat
|
|||
Eina_Bool propagate_event;
|
||||
Eina_Bool repeat_event;
|
||||
Eina_Bool clipees_has;
|
||||
Eina_Bool fillx, filly;
|
||||
|
||||
visible = efl_gfx_entity_visible_get(eo_obj);
|
||||
layer = efl_gfx_stack_layer_get(eo_obj);
|
||||
|
@ -2342,6 +2384,7 @@ _efl_canvas_object_efl_object_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Dat
|
|||
//efl_gfx_size_hint_request_get(eo_obj, &requestw, &requesth);
|
||||
efl_gfx_size_hint_align_get(eo_obj, &dblx, &dbly);
|
||||
efl_gfx_size_hint_weight_get(eo_obj, &dblw, &dblh);
|
||||
efl_gfx_size_hint_fill_get(eo_obj, &fillx, &filly);
|
||||
efl_gfx_color_get(eo_obj, &r, &g, &b, &a);
|
||||
focus = evas_object_focus_get(eo_obj);
|
||||
m = efl_canvas_object_pointer_mode_get(eo_obj);
|
||||
|
@ -2383,6 +2426,10 @@ _efl_canvas_object_efl_object_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Dat
|
|||
EFL_DBG_INFO_APPEND(node, "x", EINA_VALUE_TYPE_DOUBLE, dblx);
|
||||
EFL_DBG_INFO_APPEND(node, "y", EINA_VALUE_TYPE_DOUBLE, dbly);
|
||||
|
||||
node = EFL_DBG_INFO_LIST_APPEND(group, "Fill");
|
||||
EFL_DBG_INFO_APPEND(node, "x", EINA_VALUE_TYPE_CHAR, fillx);
|
||||
EFL_DBG_INFO_APPEND(node, "y", EINA_VALUE_TYPE_CHAR, filly);
|
||||
|
||||
node = EFL_DBG_INFO_LIST_APPEND(group, "Weight");
|
||||
EFL_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_DOUBLE, dblw);
|
||||
EFL_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_DOUBLE, dblh);
|
||||
|
|
|
@ -330,6 +330,7 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
|
|||
Evas_Object_Table_Option *opt;
|
||||
Evas_Coord minw, minh, o_minw, o_minh;
|
||||
Eina_Bool expand_h, expand_v;
|
||||
Eina_Bool fill_h, fill_v;
|
||||
|
||||
o_minw = 0;
|
||||
o_minh = 0;
|
||||
|
@ -350,6 +351,8 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
|
|||
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
|
||||
evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v);
|
||||
evas_object_size_hint_weight_get(child, &weightw, &weighth);
|
||||
//only for Efl.Ui.Table
|
||||
efl_gfx_size_hint_fill_get(child, &fill_h, &fill_v);
|
||||
|
||||
child_minw = opt->min.w + opt->pad.l + opt->pad.r;
|
||||
child_minh = opt->min.h + opt->pad.t + opt->pad.b;
|
||||
|
@ -375,13 +378,13 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
|
|||
expand_v = 1;
|
||||
}
|
||||
|
||||
opt->fill_h = 0;
|
||||
opt->fill_h = fill_h;
|
||||
if (opt->align.h < 0.0)
|
||||
{
|
||||
opt->align.h = 0.5;
|
||||
opt->fill_h = 1;
|
||||
}
|
||||
opt->fill_v = 0;
|
||||
opt->fill_v = fill_v;
|
||||
if (opt->align.v < 0.0)
|
||||
{
|
||||
opt->align.v = 0.5;
|
||||
|
|
|
@ -62,6 +62,7 @@ typedef struct _Evas_Layer Evas_Layer;
|
|||
typedef struct _Evas_Size Evas_Size;
|
||||
typedef struct _Evas_Aspect Evas_Aspect;
|
||||
typedef struct _Evas_Border Evas_Border;
|
||||
typedef struct _Evas_Bool_Pair Evas_Bool_Pair;
|
||||
typedef struct _Evas_Double_Pair Evas_Double_Pair;
|
||||
typedef struct _Evas_Size_Hints Evas_Size_Hints;
|
||||
typedef struct _Evas_Data_Node Evas_Data_Node;
|
||||
|
@ -932,6 +933,11 @@ struct _Evas_Border
|
|||
Evas_Coord l, r, t, b;
|
||||
};
|
||||
|
||||
struct _Evas_Bool_Pair
|
||||
{
|
||||
Eina_Bool x, y;
|
||||
};
|
||||
|
||||
struct _Evas_Double_Pair
|
||||
{
|
||||
double x, y;
|
||||
|
@ -944,6 +950,7 @@ struct _Evas_Size_Hints
|
|||
Evas_Aspect aspect;
|
||||
Evas_Double_Pair align, weight;
|
||||
Evas_Border padding;
|
||||
Evas_Bool_Pair fill;
|
||||
Evas_Display_Mode dispmode;
|
||||
};
|
||||
|
||||
|
@ -1186,7 +1193,6 @@ struct _Evas_Object_Protected_Data
|
|||
Eina_Bool ctor : 1; // used legacy constructor
|
||||
Eina_Bool visible_set : 1; // visibility manually set
|
||||
Eina_Bool weight_set : 1; // weight manually set
|
||||
Eina_Bool align_set : 1; // align manually set
|
||||
Eina_Bool finalized : 1; // object fully constructed
|
||||
} legacy;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ grid_setup()
|
|||
box = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL));
|
||||
efl_gfx_size_hint_weight_set(box, EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND);
|
||||
efl_gfx_size_hint_align_set(box, EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL);
|
||||
efl_gfx_size_hint_fill_set(box, EINA_TRUE, EINA_TRUE);
|
||||
elm_win_resize_object_add(win, box);
|
||||
|
||||
grid = efl_add(EFL_UI_GRID_CLASS, box);
|
||||
|
|
Loading…
Reference in New Issue