From 1aa946125d6d22538ac3521f4ba37c88e0f96a5a Mon Sep 17 00:00:00 2001 From: Sung-Taek Hong Date: Mon, 25 Jan 2016 19:44:24 +0900 Subject: [PATCH] [Box] update align and wight size hint descriptions Change-Id: I876a7edc8cc6f163be362c440ca4950ab74e4c96 Signed-off-by: Sung-Taek Hong --- .../html/images/size_hint_align.png | Bin 0 -> 6457 bytes .../html/images/size_hint_weight.png | Bin 0 -> 2843 bytes .../html/native/efl/container_box_n.htm | 20 +++++++++++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 org.tizen.ui.practices/html/images/size_hint_align.png create mode 100644 org.tizen.ui.practices/html/images/size_hint_weight.png diff --git a/org.tizen.ui.practices/html/images/size_hint_align.png b/org.tizen.ui.practices/html/images/size_hint_align.png new file mode 100644 index 0000000000000000000000000000000000000000..5993264af7ac21e9569017ae63392313985b8192 GIT binary patch literal 6457 zcmc(k2~^VCzQ?srT6r{0Q_GanIyRVO=8&3n$|-Zm24}@Ehnz@ro~UD%roz>7O3}>J zaKN~mGo^W*g8tV{^#wok9~RP*UiLkGeP;lFeQW<~P;YM+AAi1UelGX?UG5(X zdf@MV%<#JDO{*s&Qha>UIoI`mz7ssUFb?%PI*SA>XP;_SjH{?i(zhu-7Z!5WzaqIS zWNQ7LdcynHL2eggg!s?AvFG2dWuNfYXg>`*AJ_0XZX#~i9v|=t_x%cc;~GBf)#Nvk z8AFb?_fnni80Y48hqY5^@9i^A4@tUs&M4>m`b0B@a@FeDKZC< z-L)9IGe-f;I!nq4K`z8YO|uXs#P;4GPSmg;qoO43n7FvOY^AbxAnnr|syRnYOiV*= zMB-&e4M7kAl3lt?A2|hL4K&Ev(1UKH!){yo8|rP*$>Xo3oO)mnl^r8z4SP9lvUU=W zQz#ou=3F{E8%xG`}DsZ!X5rQ`6P)SlKQ zu=F7(zG4gwXhyJ#gQ2ZTn_UbeW5R%#nMPxe#pis-P#CXWd{3qM_NwrSLUvlC{KfmgiI*xY?QQk_GO6s& zXwB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ls2Y+$Z&9x)0~#>PPnske(b9yi&~4!h0(#Rw9Cu!TIIK@X$uq2EMtsw?lO_6MRxhm zgK)D$D`o>jIv20hye0Mf4qR9Xva+=Gkp(vrD&6d%I+; zldAMMF6r8RIZ0k(j|u{vD;cp;>wYoTj(bjD>E)UqCDuFKXbpX2B-{H~(_@zINaY^4 zu%Ix~M%;g?JZ7QIJy-3PX#Y9ER97eCMA9_dkUH|J#a$w{N9#ajl=>>(lm$ zilw>v=Sd$E>2}0mi>n6n<1aIZYm+|K$vtaMtLWTH{pz!{{@-s*>FKrfv6wXlu?VoY zmOyPoDqG`;=o9w(2@(nwkVdVqub0FtleS|CDqQEYyOzf@q1_*3{3zkmE{C>evKCW) z4n89ib#&ad^4{gVk?$EY1MAkt$e;xgdvsF3iG!&TB596E4yvlE%aR_bl9n-E>uIsv V;F4Setting the Alignment -

You can set the alignment of UI components inside a box using the elm_box_align_set() function. The function takes 2 doubles values, a horizontal value and a vertical value, representing the percentage between 0 and 1.0 of the alignment in the horizontal and vertical axes. When you add a UI component with the elm_box_pack_end() or elm_box_pack_start() function, Elementary computes the global size of the box. If the global size is bigger than the size of the box's parent, the box takes up all the space occupied by the parent, and the size of the parent can be extended to hold the box. If the global size is smaller than the parent's size, the alignment values set the position of the box inside the parent.

+

You can set the alignment of UI components inside a box using the elm_box_align_set() function. The function takes 2 double values, a horizontal value and a vertical value, representing the percentage between 0 and 1.0 of the alignment in the horizontal and vertical axes. When you add a UI component with the elm_box_pack_end() or elm_box_pack_start() function, Elementary computes the global size of the box. If the global size is bigger than the size of the box's parent, the box takes up all the space occupied by the parent, and the size of the parent can be extended to hold the box. If the global size is smaller than the parent's size, the alignment values set the position of the box inside the parent.

Figure: Alignment

Alignment

@@ -188,20 +188,30 @@ evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 2, 1);
  • -

    To change the alignment of the icon relative to the parent, use the evas_object_size_hint_align() function. By default, the icon is centered, so it is aligned with a value of 0.5. To change the alignment:

    +

    To change the alignment of the icon relative to the parent, use the evas_object_size_hint_align_set() function. The function takes 2 double values, a horizontal and vertical value, representing the percentage between 0.0 and 1.0 of the alignment in the horizontal and vertical axes. By default, the icon is centered with a value of 0.5. To change the alignment:

    +

    Figure: Align size hint

    +

    Align size hint

    +
    +evas_object_size_hint_align_set(ic, 0.0, 1.0);
    +
    +

    In the above case, the icon is aligned to the bottom left corner of the parent. Exceptionally, EVAS_HINT_FILL or -1.0 can be given as a horizontal and vertical value, which requests Evas to fill the Evas object in the parent area.

     evas_object_size_hint_align_set(ic, EVAS_HINT_FILL, EVAS_HINT_FILL);
     
    -

    In the above case, the icon is aligned to the bottom left corner of the parent.

    +

    In the above case, the icon fills the whole parent area.

  • -

    To set a weight size hint, use the evas_object_size_hint_weight_set() function. By default, the weight is not set, so the size of the icon is the minimum size. But if you set this value to 1, the icon expands as much as it can inside the container.

    +

    To set a weight size hint, use the evas_object_size_hint_weight_set() function. Weight size hint represents the Evas object's weight comparing to that of other Evas objects in the container. By default, the weight is not set, and the size of the icon will be in its minimum size. But if you set this value to 1.0, the icon will expand as much as it can inside the container.

    +

    Figure: Weight size hint

    +

    Weight size hint

     evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    +evas_object_size_hint_weight_set(ic2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
     
    +

    Do not use weight size hint along with elm_box_homogeneous_set() function, because every child will have the same weight.

  • -

    You can also use the alignment and weight hints together. In the following example, the icon takes up all the space in its parent:

    +

    You can also use the alignment and weight size hints together. In the following example, the icon takes up all the space in its parent:

     evas_object_size_hint_align_set(ic, EVAS_HINT_FILL, EVAS_HINT_FILL);
     evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    -- 
    2.7.4