summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2020-05-20 16:36:15 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2020-05-20 16:36:15 +0900
commita227b83f41adc3d8ca5f27c36f4e708d2f508c35 (patch)
treed2fc165422ac8dcb05935cc3a3ec5f9329e3727d /src/lib/elementary
parent0332991a4d892bc618f2cd3ac71917366cdccc00 (diff)
efl_ui_layout: remove group_calcualte to respect legacy min size
Summary: For legacy elm_layout, the size should be calculated based on `hint_size_combined_min` instead of `hint_size_min` in the group_calculate. Also, `_efl_ui_layout_efl_canvas_group_group_calculate` is unnecessary because it is added to allow finger size policy differentiation between inherited layout and layout object (see also, 46cf288d32f06a0c82ef227c65e55062bf494672), however, it can be set by `finger_size_multiplier` proeprty in constructor. Test Plan: Check `evas_object_size_hint_min_set` is respected. layout_example.c ``` //Compile with: //edje_cc layout_example.edc && gcc -g layout_example.c -o layout_example `pkg-config --cflags --libs elementary` #include <Elementary.h> EAPI_MAIN int elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) { Evas_Object *win, *layout, *box; elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); win = elm_win_util_standard_add("layout", "Layout"); elm_win_autodel_set(win, EINA_TRUE); box = elm_box_add(win); evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(box); elm_win_resize_object_add(win, box); layout = elm_layout_add(box); evas_object_size_hint_min_set(layout, 300, 200); elm_layout_file_set(layout, "./layout_example.edj", "mylayout"); evas_object_show(layout); elm_box_pack_end(box, layout); evas_object_resize(win, 300, 300); evas_object_show(win); elm_run(); return 0; } ELM_MAIN() ``` layout_example.edc ``` collections { group { name: "mylayout"; parts { part { name: "bg"; type: RECT; description { state: "default" 0.0; color: 100 190 100 255; } } part { name: "mytext1"; type: TEXT; description { state: "default" 0.0; text { size: 30; text: "my text1"; min: 1 0; } color: 0 255 0 255; rel1.relative: 0.0 0.0; rel2.relative: 1.0 0.3; } } } parts { part { name: "mytext2"; type: TEXT; description { state: "default" 0.0; text { size: 30; text: "my text2"; min: 1 0; } color: 0 255 255 255; rel1.relative: 0.0 0.3; rel2.relative: 1.0 0.6; } } } } } ``` Reviewers: zmike, Jaehyun_Cho, woohyun Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11858
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_layout.c7
-rw-r--r--src/lib/elementary/efl_ui_layout.eo1
2 files changed, 0 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 34a9c2967e..1839406cb0 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -1000,13 +1000,6 @@ _efl_ui_layout_base_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Data *sd)
1000 efl_canvas_group_del(efl_super(obj, MY_CLASS)); 1000 efl_canvas_group_del(efl_super(obj, MY_CLASS));
1001} 1001}
1002 1002
1003EOLIAN static void
1004_efl_ui_layout_efl_canvas_group_group_calculate(Eo *obj, void *_pd EINA_UNUSED)
1005{
1006 efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
1007 _sizing_eval(obj, efl_data_scope_get(obj, MY_CLASS), NULL);
1008}
1009
1010/* rewrite or extend this one on your derived class as to suit your 1003/* rewrite or extend this one on your derived class as to suit your
1011 * needs */ 1004 * needs */
1012EOLIAN static void 1005EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo
index 39a10b4a99..ab4d67c1e3 100644
--- a/src/lib/elementary/efl_ui_layout.eo
+++ b/src/lib/elementary/efl_ui_layout.eo
@@ -19,6 +19,5 @@ class Efl.Ui.Layout extends Efl.Ui.Layout_Base implements Efl.File
19 Efl.File.load; 19 Efl.File.load;
20 Efl.File.unload; 20 Efl.File.unload;
21 Efl.Object.constructor; 21 Efl.Object.constructor;
22 Efl.Canvas.Group.group_calculate;
23 } 22 }
24} 23}