summaryrefslogtreecommitdiff
path: root/src/examples/elementary/toolbar_cxx_example_01.cc
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-01-16 16:47:51 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2019-01-16 16:47:51 +0900
commit78ae9c0ae069ff86e701ff98cf5674cc491ee156 (patch)
treeeb8ce90d755fc664b839b155778e31f5ec42dad0 /src/examples/elementary/toolbar_cxx_example_01.cc
parent4858d9eb81f4aa5d24b9555b5caf0e058609d8ab (diff)
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
Diffstat (limited to '')
-rw-r--r--src/examples/elementary/toolbar_cxx_example_01.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/examples/elementary/toolbar_cxx_example_01.cc b/src/examples/elementary/toolbar_cxx_example_01.cc
index 85fae352d7..5a884b96f7 100644
--- a/src/examples/elementary/toolbar_cxx_example_01.cc
+++ b/src/examples/elementary/toolbar_cxx_example_01.cc
@@ -35,7 +35,8 @@ elm_main(int argc, char* argv[])
35 elm::Toolbar toolbar_1(instantiate, win_1); 35 elm::Toolbar toolbar_1(instantiate, win_1);
36 toolbar_1.shrink_mode_set(ELM_TOOLBAR_SHRINK_MENU); 36 toolbar_1.shrink_mode_set(ELM_TOOLBAR_SHRINK_MENU);
37 toolbar_1.hint_weight_set(0, 0); 37 toolbar_1.hint_weight_set(0, 0);
38 toolbar_1.hint_align_set(-1, 0); 38 toolbar_1.hint_align_set(0.5, 0);
39 toolbar_1.hint_fill_set(ture, false);
39 toolbar_1.menu_parent_set(win_1); 40 toolbar_1.menu_parent_set(win_1);
40 elm::toolbar::Item item_1 = efl::eo::downcast<elm::toolbar::Item> 41 elm::toolbar::Item item_1 = efl::eo::downcast<elm::toolbar::Item>
41 (toolbar_1.item_append("document-print", "Hello", nullptr, nullptr)); 42 (toolbar_1.item_append("document-print", "Hello", nullptr, nullptr));
@@ -71,7 +72,7 @@ elm_main(int argc, char* argv[])
71 box_1.pack_end(toolbar_1); 72 box_1.pack_end(toolbar_1);
72 elm::Widget table_1(elm_table_add(win_1._eo_ptr())); 73 elm::Widget table_1(elm_table_add(win_1._eo_ptr()));
73 table_1.hint_weight_set(0.0, 1.0); 74 table_1.hint_weight_set(0.0, 1.0);
74 table_1.hint_align_set(-1, -1); 75 table_1.hint_fill_set(true, true);
75 table_1.visible_set(true); 76 table_1.visible_set(true);
76 77
77 elm::Widget photo_1(elm_photo_add(win_1._eo_ptr())); 78 elm::Widget photo_1(elm_photo_add(win_1._eo_ptr()));