flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurice Amsellem (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLEX-34107) IconItemRenderer separators disappear when using a large font
Date Sun, 23 Feb 2014 20:36:19 GMT

    [ https://issues.apache.org/jira/browse/FLEX-34107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13909759#comment-13909759
] 

Maurice Amsellem edited comment on FLEX-34107 at 2/23/14 8:35 PM:
------------------------------------------------------------------

I did some more testing to validate the opaqueBackground assumption.

I made two tests:
- UIComponent displaying a colored rect and having opaque background => both extents match
- UIComponent displaying a colored rect, a text label (StyleableTextField) and having opaque
background => opaque background exceeds the component extent.

so it seems that the text is the cause of the background overflow.
Explanation:
- opaqueBackground extent is based on the component's children extents, and not on the UIComponent
size.
- when you set a height of H to a StyleableTextField, AIR will give it around H+10%
=> so if you set the extent of the text child to 100% of UIComponent, the opaqueBackgound
with overflow, because the text actual extent is 110% of the UIComponent.

To prove this, simply show the text own background:
{code}
     labelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
 ...
      labelDisplay.background = true;
      labelDisplay.backgroundColor = 0xFF0000;
{code}

And you can see that the text background and the opaque background of its parent match.

So that explains the symptoms you describe:  when there is enough padding around the renderer,
the extra sizing the internal label has no effect.




was (Author: mamsellem):
I did some more testing to validate the opaqueBackground assumption.

I made two tests:
- UIComponent displaying a colored rect and having opaque background => both extents match
- UIComponent displaying a colored rect, a text label (StyleableTextField) and having opaque
background => opaque background exceeds the component extent.

so it seems that the text is the cause of the background overflow.
Explanation:
- opaqueBackground extent is based on the component's children extents, and not on the UIComponent
size.
- when you set a height of H to a StyleableTextField, AIR will give it around H+10%
=> so if you set the extent of the text child to 100% of UIComponent, the opaqueBackgound
with overflow, because the text actual extent is 110% of the UIComponent.

To prove this, simply show the text own background:
{code}
     labelDisplay = StyleableTextField(createInFontContext(StyleableTextField));
 ...
      labelDisplay.background = true;
      labelDisplay.backgroundColor = 0xFF0000;
{code}

And you can see that the text background and the opaque background of its parent match.

So that explains the symptoms you describe:  when there is enough padding around the renderer,
the extra sizing the internal label has no effect.


QED.


> IconItemRenderer separators disappear when using a large font
> -------------------------------------------------------------
>
>                 Key: FLEX-34107
>                 URL: https://issues.apache.org/jira/browse/FLEX-34107
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.12.0
>         Environment: iOS6
>            Reporter: Piotr Zarzycki
>            Assignee: Maurice Amsellem
>         Attachments: ListShiftedbackground.png, List_noOpaqueBackground_OK.png, TestSparkList.zip,
screenshot-1.jpg
>
>
> I have two spark List one with IconItemRenderer and the second with LabelItemRenderer.

> List with IconItemRenderer doesn't display line separators on iPad 2 iOS6. It also occurs
on iPhone and iPad Intellij IDEA emulators. 
> Screens from iPhone emulator: 
> List with IconItemRenderer: http://images.devs-on.net/Image/BrIaFWuM0ZUleDJY-Obszar.png
> List with LabeItemRenderer: http://images.devs-on.net/Image/xc4qWv4cdxzcdrLX-Obszar.png



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message