I've created 2 examples to demonstrate, frame_example_02 shows the desired results with a list widget, and frame_example_03 shows a genlist that doesn't restrict itself and thus extends the widget.
I disagree. Your solution does provide an alternate way to implement what the user wishes to accomplish but this really is a bug.
Documentation specifically mentions the use of externally set max size hints when a list container is set to ELM_LIST_EXPAND, the use of which Genlist doesn't respect.
ELM_LIST_EXPAND, /** Besides setting a minimum size on the transverse axis, * just like on @ref Elm_List_Mode.ELM_LIST_LIMIT, the list * will set a minimum size on th longitudinal axis, trying * to reserve space to all its children to be visible at a * time. . This is naturally bound by the list object's * maximum size hints, set externally. */
List and genlist do not work the same. They don't handle their sizing the same. List realizes all of its objects. Genlist does not. You are taking documentation out of place and assuming it works elsewhere. Here is the documentation for genlist_mode_set. Expand is not even there. Genlist doesn't work that way.
- @brief This sets the horizontal stretching mode. *
- This sets the mode used for sizing items horizontally. Valid modes are
- #ELM_LIST_LIMIT, #ELM_LIST_SCROLL, and #ELM_LIST_COMPRESS. The default is
- #ELM_LIST_SCROLL. This mode means that if items are too wide to fit, the
- scroller will scroll horizontally. Otherwise items are expanded to fill the
- width of the viewport of the scroller. If it is #ELM_LIST_LIMIT, items will
- be expanded to the viewport width and limited to that size. If it is
- #ELM_LIST_COMPRESS, the item width will be fixed (restricted to a minimum
- of) to the list width when calculating its size in order to allow the height
- to be calculated based on it. This allows, for instance, text block to wrap
- lines if the Edje part is configured with "text.min: 0 1". *
- @note #ELM_LIST_COMPRESS will make list resize slower as it will have to
- recalculate every item height again whenever the list width changes! *
- @note Homogeneous mode is for that all items in the genlist same
- width/height. With #ELM_LIST_COMPRESS, it makes genlist items to fast
- initializing. However there's no sub-objects in genlist which can be on the
- flying resizable (such as TEXTBLOCK). If then, some dynamic esizable objects
- in genlist would not diplayed properly. *
- @param[in] mode The mode to use (one of #ELM_LIST_SCROLL or
- #ELM_LIST_LIMIT). *
- @ingroup Elm_Genlist */
EOAPI void elm_obj_genlist_mode_set(Elm_List_Mode mode);
After looking at the code and doing some exploring... I have found that there are plenty of problems here. First of all, genlist_mode_set needs to have correct documentation related to whatever its purpose is... yeah yeah... nobody knows... I get it... kuuko pointed out that raster added the expand here: 33c6be230b20f92c522e80ce7ee323d13142adbb ... This seems out of place and contrary to the documentation as it affects height. Regardless... genlist's currecnt layout_eval does a really poor job of adhering to min/max hints. If the intent here is for mode_set to work like it does with list, then the eval needs to be rewritten.
Per conversation with raster, the expected behavior on genlist in a frame that you are getting is correct as I originally stated. It doesn't handle sizing this way. You have to include something else in the frame such as a table with an evas rect and genlist packed into the same cell and apply sizing to the rect to control the genlist size.