When items are packed in Box widget, we usually use size hint weight to set item size proportionately. If there are two items which don't have size hint min, but the first's weight is 0.25, and the second's is 0.75, we can guess that they will divide up box size in 1:3 ratio. For example, if the size of box is 400px, the first item will have 100px, the second 300px.
BTW, Elementary sets item's size hint min internally and automatically. >From here, difficuty in estimating item size issue occurs. In above case, if the first item has size hint min value as 125px, but the second doesn't, can you guess what happens next? http://imgur.com/vVZ7P2I Even though the weight of the first item is 0.25, but it will occupy 193px. (0.48) Here is the equation. ITEM_SIZE = ITEM_MIN_SIZE + (BOX_SIZE - SUM_OF_ITEMS_MIN_SIZE) * WEIGHT 193.75 = 125 + (400 - (125 + 0)) * 0.25 You can say that size hint min and weight don't work well at the same time, so using weight and min is incorrect. Or, they are just "SIZE HINT", so we can say that we don't guarantee the proportion. However the problem is that item size caculations in Evas and Elementary seem different. (of course logically same but give such an impression due to automated setting of size hint min in Elementary) If EFL starters try to make relatively arranged items with box, they will be confused. The bigger problem is that if there are three items have different min size but have EVAS_HINT_EXPAND weight (1.0), developers may want to homogeneous items, but all of them will have different size. If they want all items to have same size, elm_box_homogeneous_set() is available, but want some of items to have same size, that intention cannot be realized in current calculation logic. I cannot find the clear way to solve this, but there can be several possibilities. First, crop item if its min size expands over its given size get by weight. http://imgur.com/pWZYfDe Second, expand the entire box to show item fully, and keep ratio. This might need applying scrollable interface to box to keep original box size. http://imgur.com/D6cMGiV This kind of conflict occurs in applying size hint aspect also. If EVAS_ASPECT_CONTROL_VERTICAL is set, that means fixing the aspect ratio based on vertical size, but if there is bigger min width than the value get by aspect, then which value should be chosen? http://imgur.com/UXmWZw8 Ignore min width? Expand to min width even though aspect ratio is broken? Expand item size to keep aspect ratio but don't fit vertical size? 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&iu=/4140 _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
