Re: [E-devel] Evas box layout doesn't guarantee items' min size.
On Thu, 25 Feb 2016 11:08:19 +0900 Conrad Umsaid: > I am trying to bring edje box and table to elm.box and elm.table to provide > more features. > > Unlike table, each box can have its own layout function, so there are > several issues to adopt edje box at once. So, if there are not significant > differences between evas box layouts (builtin edje box uses them) and elm > box layout, using evas box layouts seems a good choice. By doing that, box > behaviors will be consistent along with evas, edje and elementary. (at this > moment, evas = edje != elm) > > BTW, even though we don't make them same, I found that something weird in > evas box behavior. Look at this picture. http://imgur.com/zYk0HjF awesomely done. :) > Let's assume that there is an evas box which has three items. > The layout function of box is "evas_object_box_layout_horizontal", and > three items are evas rectangles having size hint min width 50px. (Items can > be something different, for example, elm.button) The second and third > item's horizontal weight is EVAS_HINT_EXPAND(1.0). The first one's is 0. > > I expected that size hint min width of box would be 150px. (3 * 50px) > However, evas box layout ignores expanded item's size hint min, so expanded > items will become smaller because box doesn't have min size including them. > > I think that boxes' behaviors can be different, but size hint min value of > items should be guaranteed except that box is resized forcibly smaller than > its own min size. > What do you think of this? Is this a normal behavior for evas box? we can't change the default behavior atm - but we could add new behaviors that have to be enabled explicitly. :) new layout functions. :) > Regards, > conr2d > -- > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Evas box layout doesn't guarantee items' min size.
I am trying to bring edje box and table to elm.box and elm.table to provide more features. Unlike table, each box can have its own layout function, so there are several issues to adopt edje box at once. So, if there are not significant differences between evas box layouts (builtin edje box uses them) and elm box layout, using evas box layouts seems a good choice. By doing that, box behaviors will be consistent along with evas, edje and elementary. (at this moment, evas = edje != elm) BTW, even though we don't make them same, I found that something weird in evas box behavior. Look at this picture. http://imgur.com/zYk0HjF Let's assume that there is an evas box which has three items. The layout function of box is "evas_object_box_layout_horizontal", and three items are evas rectangles having size hint min width 50px. (Items can be something different, for example, elm.button) The second and third item's horizontal weight is EVAS_HINT_EXPAND(1.0). The first one's is 0. I expected that size hint min width of box would be 150px. (3 * 50px) However, evas box layout ignores expanded item's size hint min, so expanded items will become smaller because box doesn't have min size including them. I think that boxes' behaviors can be different, but size hint min value of items should be guaranteed except that box is resized forcibly smaller than its own min size. What do you think of this? Is this a normal behavior for evas box? Regards, conr2d -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Evas and layout
The last try of Sachiel: http://pastebin.com/m4d2e9b00 (I don't have the initial link) The text is at the top - right, great but the text is display with only 1 line instead of 2 or more if necessary (yes I use a textblock .) :( If we use text.min: 0 1 in the edc file, evas infinite loop in the layout methods :D 2009/6/23 Atton Jonathan jonathan.at...@gmail.com Sachiel found this solution : http://pastebin.com/m30e9012f but the text is centered in the x axis. I try to play with the weight and the solution of Sachiel but the text is always center to the center the left or the right of the area's layout :/ 2009/6/23 Gustavo Sverzut Barbieri barbi...@profusion.mobi On Tue, Jun 23, 2009 at 4:13 PM, Atton Jonathanjonathan.at...@gmail.com wrote: If someone find how to set both items to the top, I ll give him a cookie ! Test apps: http://watchwolf.fr/public/test_box.tar.gz no time to test it now, but it should be a matter of setting weight = 0 (no weight, no expand) and align.y = 0.0 2009/6/23 Gustavo Sverzut Barbieri barbi...@profusion.mobi On Mon, Jun 22, 2009 at 5:49 PM, Atton Jonathan jonathan.at...@gmail.com wrote: hey, In eyelight I use some vertical layout but I don't get what I want. The items are not set to the top but are placed to fill all the box. It seems than the layout does: the layout height / number of items = height of an item, each item has the same height ! My items are created from an edje group with a textblock inside. I have attached a screenshot of the pb, each item has the same height, consequently the last item (the bigger item) is not completely display ! The vertical layout is not supposed to fit the item list to the top ? With the help of Sachiel I have made some tests, especially try to set the max size with the result of evas_object_geometry_get() but the result is 0 :/ Currently my code is: Evas_Object *o_text = edje_object_add(pres-evas); edje_object_file_set(o_text, pres-theme, eyelight/item_simple_text) ; edje_object_part_text_set(o_text,object.text,text); evas_object_size_hint_align_set(o_text, -1, -1); evas_object_size_hint_weight_set(o_text, -1, -1); evas_object_show(o_text); evas_object_move(o_text, 0, 0); edje_object_part_box_append(o_area,buf,o_text); check out documentation at http://docs.enlightenment.org/api/evas/html/group__Evas__Object__Box.html#g3aebf02a2e87e43f9dcba5e73291234c and the other layout functions. They say what properties they expect from child. As for the space allocated to items: depends on your layout. If you choose homogeneous (not the max_size variant), that is correct. If you choose the max_size homogeneous, it will query the maximum min_size and allocate it to everyone. As for alignment within the allocated space, that's depend on the o_text align hint, in your case you use -1 that means justify (align to both top and bottom, or left and right... either centers the object or resize it to use the area, depends on min/max hints). Layout is complex, sorry... we tried to document it, but we could use some test cases and examples on various types. Anyone willing to write them? :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Regards. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Regards. -- Regards. -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Evas and layout
On Wed, Jun 24, 2009 at 4:49 AM, Atton Jonathanjonathan.at...@gmail.com wrote: The last try of Sachiel: http://pastebin.com/m4d2e9b00 (I don't have the initial link) The text is at the top - right, great but the text is display with only 1 line instead of 2 or more if necessary (yes I use a textblock .) :( If we use text.min: 0 1 in the edc file, evas infinite loop in the layout methods :D ouch, this is bad. I'm quite busy this month, specially this week, so I cannot debug it or even try the tests or to provide one based on what I think should work, so you'll have to try debug it yourself. If you found a case where it loop forever, please try to fix. I can take a look later, just ping me during the weekend or next week. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Evas and layout
On Mon, Jun 22, 2009 at 5:49 PM, Atton Jonathanjonathan.at...@gmail.com wrote: hey, In eyelight I use some vertical layout but I don't get what I want. The items are not set to the top but are placed to fill all the box. It seems than the layout does: the layout height / number of items = height of an item, each item has the same height ! My items are created from an edje group with a textblock inside. I have attached a screenshot of the pb, each item has the same height, consequently the last item (the bigger item) is not completely display ! The vertical layout is not supposed to fit the item list to the top ? With the help of Sachiel I have made some tests, especially try to set the max size with the result of evas_object_geometry_get() but the result is 0 :/ Currently my code is: Evas_Object *o_text = edje_object_add(pres-evas); edje_object_file_set(o_text, pres-theme, eyelight/item_simple_text) ; edje_object_part_text_set(o_text,object.text,text); evas_object_size_hint_align_set(o_text, -1, -1); evas_object_size_hint_weight_set(o_text, -1, -1); evas_object_show(o_text); evas_object_move(o_text, 0, 0); edje_object_part_box_append(o_area,buf,o_text); check out documentation at http://docs.enlightenment.org/api/evas/html/group__Evas__Object__Box.html#g3aebf02a2e87e43f9dcba5e73291234c and the other layout functions. They say what properties they expect from child. As for the space allocated to items: depends on your layout. If you choose homogeneous (not the max_size variant), that is correct. If you choose the max_size homogeneous, it will query the maximum min_size and allocate it to everyone. As for alignment within the allocated space, that's depend on the o_text align hint, in your case you use -1 that means justify (align to both top and bottom, or left and right... either centers the object or resize it to use the area, depends on min/max hints). Layout is complex, sorry... we tried to document it, but we could use some test cases and examples on various types. Anyone willing to write them? :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Evas and layout
If someone find how to set both items to the top, I ll give him a cookie ! Test apps: http://watchwolf.fr/public/test_box.tar.gz 2009/6/23 Gustavo Sverzut Barbieri barbi...@profusion.mobi On Mon, Jun 22, 2009 at 5:49 PM, Atton Jonathanjonathan.at...@gmail.com wrote: hey, In eyelight I use some vertical layout but I don't get what I want. The items are not set to the top but are placed to fill all the box. It seems than the layout does: the layout height / number of items = height of an item, each item has the same height ! My items are created from an edje group with a textblock inside. I have attached a screenshot of the pb, each item has the same height, consequently the last item (the bigger item) is not completely display ! The vertical layout is not supposed to fit the item list to the top ? With the help of Sachiel I have made some tests, especially try to set the max size with the result of evas_object_geometry_get() but the result is 0 :/ Currently my code is: Evas_Object *o_text = edje_object_add(pres-evas); edje_object_file_set(o_text, pres-theme, eyelight/item_simple_text) ; edje_object_part_text_set(o_text,object.text,text); evas_object_size_hint_align_set(o_text, -1, -1); evas_object_size_hint_weight_set(o_text, -1, -1); evas_object_show(o_text); evas_object_move(o_text, 0, 0); edje_object_part_box_append(o_area,buf,o_text); check out documentation at http://docs.enlightenment.org/api/evas/html/group__Evas__Object__Box.html#g3aebf02a2e87e43f9dcba5e73291234c and the other layout functions. They say what properties they expect from child. As for the space allocated to items: depends on your layout. If you choose homogeneous (not the max_size variant), that is correct. If you choose the max_size homogeneous, it will query the maximum min_size and allocate it to everyone. As for alignment within the allocated space, that's depend on the o_text align hint, in your case you use -1 that means justify (align to both top and bottom, or left and right... either centers the object or resize it to use the area, depends on min/max hints). Layout is complex, sorry... we tried to document it, but we could use some test cases and examples on various types. Anyone willing to write them? :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Regards. -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Evas and layout
On Tue, Jun 23, 2009 at 4:13 PM, Atton Jonathanjonathan.at...@gmail.com wrote: If someone find how to set both items to the top, I ll give him a cookie ! Test apps: http://watchwolf.fr/public/test_box.tar.gz no time to test it now, but it should be a matter of setting weight = 0 (no weight, no expand) and align.y = 0.0 2009/6/23 Gustavo Sverzut Barbieri barbi...@profusion.mobi On Mon, Jun 22, 2009 at 5:49 PM, Atton Jonathanjonathan.at...@gmail.com wrote: hey, In eyelight I use some vertical layout but I don't get what I want. The items are not set to the top but are placed to fill all the box. It seems than the layout does: the layout height / number of items = height of an item, each item has the same height ! My items are created from an edje group with a textblock inside. I have attached a screenshot of the pb, each item has the same height, consequently the last item (the bigger item) is not completely display ! The vertical layout is not supposed to fit the item list to the top ? With the help of Sachiel I have made some tests, especially try to set the max size with the result of evas_object_geometry_get() but the result is 0 :/ Currently my code is: Evas_Object *o_text = edje_object_add(pres-evas); edje_object_file_set(o_text, pres-theme, eyelight/item_simple_text) ; edje_object_part_text_set(o_text,object.text,text); evas_object_size_hint_align_set(o_text, -1, -1); evas_object_size_hint_weight_set(o_text, -1, -1); evas_object_show(o_text); evas_object_move(o_text, 0, 0); edje_object_part_box_append(o_area,buf,o_text); check out documentation at http://docs.enlightenment.org/api/evas/html/group__Evas__Object__Box.html#g3aebf02a2e87e43f9dcba5e73291234c and the other layout functions. They say what properties they expect from child. As for the space allocated to items: depends on your layout. If you choose homogeneous (not the max_size variant), that is correct. If you choose the max_size homogeneous, it will query the maximum min_size and allocate it to everyone. As for alignment within the allocated space, that's depend on the o_text align hint, in your case you use -1 that means justify (align to both top and bottom, or left and right... either centers the object or resize it to use the area, depends on min/max hints). Layout is complex, sorry... we tried to document it, but we could use some test cases and examples on various types. Anyone willing to write them? :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Regards. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Evas and layout
Sachiel found this solution : http://pastebin.com/m30e9012f but the text is centered in the x axis. I try to play with the weight and the solution of Sachiel but the text is always center to the center the left or the right of the area's layout :/ 2009/6/23 Gustavo Sverzut Barbieri barbi...@profusion.mobi On Tue, Jun 23, 2009 at 4:13 PM, Atton Jonathanjonathan.at...@gmail.com wrote: If someone find how to set both items to the top, I ll give him a cookie ! Test apps: http://watchwolf.fr/public/test_box.tar.gz no time to test it now, but it should be a matter of setting weight = 0 (no weight, no expand) and align.y = 0.0 2009/6/23 Gustavo Sverzut Barbieri barbi...@profusion.mobi On Mon, Jun 22, 2009 at 5:49 PM, Atton Jonathan jonathan.at...@gmail.com wrote: hey, In eyelight I use some vertical layout but I don't get what I want. The items are not set to the top but are placed to fill all the box. It seems than the layout does: the layout height / number of items = height of an item, each item has the same height ! My items are created from an edje group with a textblock inside. I have attached a screenshot of the pb, each item has the same height, consequently the last item (the bigger item) is not completely display ! The vertical layout is not supposed to fit the item list to the top ? With the help of Sachiel I have made some tests, especially try to set the max size with the result of evas_object_geometry_get() but the result is 0 :/ Currently my code is: Evas_Object *o_text = edje_object_add(pres-evas); edje_object_file_set(o_text, pres-theme, eyelight/item_simple_text) ; edje_object_part_text_set(o_text,object.text,text); evas_object_size_hint_align_set(o_text, -1, -1); evas_object_size_hint_weight_set(o_text, -1, -1); evas_object_show(o_text); evas_object_move(o_text, 0, 0); edje_object_part_box_append(o_area,buf,o_text); check out documentation at http://docs.enlightenment.org/api/evas/html/group__Evas__Object__Box.html#g3aebf02a2e87e43f9dcba5e73291234c and the other layout functions. They say what properties they expect from child. As for the space allocated to items: depends on your layout. If you choose homogeneous (not the max_size variant), that is correct. If you choose the max_size homogeneous, it will query the maximum min_size and allocate it to everyone. As for alignment within the allocated space, that's depend on the o_text align hint, in your case you use -1 that means justify (align to both top and bottom, or left and right... either centers the object or resize it to use the area, depends on min/max hints). Layout is complex, sorry... we tried to document it, but we could use some test cases and examples on various types. Anyone willing to write them? :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Regards. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 -- Regards. -- ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] Evas and layout
hey, In eyelight I use some vertical layout but I don't get what I want. The items are not set to the top but are placed to fill all the box. It seems than the layout does: the layout height / number of items = height of an item, each item has the same height ! My items are created from an edje group with a textblock inside. I have attached a screenshot of the pb, each item has the same height, consequently the last item (the bigger item) is not completely display ! The vertical layout is not supposed to fit the item list to the top ? With the help of Sachiel I have made some tests, especially try to set the max size with the result of evas_object_geometry_get() but the result is 0 :/ Currently my code is: Evas_Object *o_text = edje_object_add(pres-evas); edje_object_file_set(o_text, pres-theme, eyelight/item_simple_text) ; edje_object_part_text_set(o_text,object.text,text); evas_object_size_hint_align_set(o_text, -1, -1); evas_object_size_hint_weight_set(o_text, -1, -1); evas_object_show(o_text); evas_object_move(o_text, 0, 0); edje_object_part_box_append(o_area,buf,o_text); -- Regards. -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Evas and layout
The file attached ... http://watchwolf.fr/public/Eyelight/eyelight_item_height_bug.png 2009/6/22 Atton Jonathan jonathan.at...@gmail.com hey, In eyelight I use some vertical layout but I don't get what I want. The items are not set to the top but are placed to fill all the box. It seems than the layout does: the layout height / number of items = height of an item, each item has the same height ! My items are created from an edje group with a textblock inside. I have attached a screenshot of the pb, each item has the same height, consequently the last item (the bigger item) is not completely display ! The vertical layout is not supposed to fit the item list to the top ? With the help of Sachiel I have made some tests, especially try to set the max size with the result of evas_object_geometry_get() but the result is 0 :/ Currently my code is: Evas_Object *o_text = edje_object_add(pres-evas); edje_object_file_set(o_text, pres-theme, eyelight/item_simple_text) ; edje_object_part_text_set(o_text,object.text,text); evas_object_size_hint_align_set(o_text, -1, -1); evas_object_size_hint_weight_set(o_text, -1, -1); evas_object_show(o_text); evas_object_move(o_text, 0, 0); edje_object_part_box_append(o_area,buf,o_text); -- Regards. -- Regards. -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel