The TextField extent is surprising to me. What does it mean to be 15% larger? What does transform.pixelbounds show? Does it have to do with the border or background property?
-Alex ________________________________________ From: Maurice Amsellem [maurice.amsel...@systar.com] Sent: Sunday, February 23, 2014 5:20 AM To: dev@flex.apache.org Subject: Need your help on problem with opaqueBackground Hi team, Piotr has raised an interesting issue in mobile apps: https://issues.apache.org/jira/browse/FLEX-34107 When using a large font (size > 40) with IconItemRenderer on spark List, the bottom separators between items are not displayed. After some hours of debugging, I finally found the cause, but don't know how to fix it, because it's related to AIR. Here is the story, in short (details in the ticket): - Mobile item renderers "opaqueBackground=color" property draws an opaque background behind item renderers, to make scrolling faster (no transparency). - When StyleableTextField (text used in mobile renderers, inheriting from TextField) is given WxH size in flex, its actual extent will be around 15% larger - the opaqueBackground extent of a renderer (DisplayObject) is computed based on the cumulated extents of its children, not of its own width and height In LabelItemRenderer, the padding around the renderer is big enough (16 px at 160 DPI) to compensate for this excess size for fonts not too large However, in IconItemRender, the padding is set to 8px, so when the font size > 50, opaqueBackgorund overflows the item render size, and separator lines are masked. There are many ways of fixing this : - increase the padding in IconItemRenderer, for 'reasonable' font sizes - modify the measure() to account for the excess size, so that opaqueBackground never overflows. - etc... What do you think ? Maurice