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

Maurice Amsellem edited comment on FLEX-34107 at 2/24/14 11:25 PM:
-------------------------------------------------------------------

h4. Explanation of the issue: 

There are two statements that draw the colored background rect in 
LabelItemRenderer:

1) opaqueBackground property draws a colored background on the whole 
DisplayObject boundingBox to speed up scrolling (no transparency).
there is no parameters, and the drawing is performed by AIR.

2) The background is also drawn using drawRect(), for mouse hit purposes.
This one is drawn on rect (0,0,unscaledWidth,unscaledHeight), and is OK.

The problem is that opaqueBackground paints a zone on top of the text, which 
overflow the itemRenderer bounds, and that's what covers the separators.

The fix would consist in disabling opaqueBackground, if it does not degrade 
performance.


was (Author: mamsellem):
As you can see in [^ListShiftedbackground.png], using alternating colors:
-  the colored background is shifted by 5 pixels up,
- as a side effect, itcovers the previous bottom separator (in blue). 
- The top separator (in red) is displayed correctly.

There are two statements that draw the colored background rect in 
LabelItemRenderer:

1) opaqueBackground property draws a colored background on the whole 
DisplayObject boundingBox to speed up scrolling (no transparency).
there is no paramters, and the drawing is performed by AIR.

2) The background is also drawn using drawRect(), for mouse hit purposes.
This one is drawn on rect (0,0,unscaledWidth,unscaledHeight), and is OK.

So I *disabled opaqueBackground* in TestIconItemRendererList.mxml
{code}
   override protected function drawBackground(unscaledWidth: Number, 
unscaledHeight: Number): void {
            super.drawBackground(unscaledWidth,unscaledHeight);
            opaqueBackground = null;
        }
{code} 

and now only the flex-drawn background is shown:
- it's not shifted anymore.
- both separators are displayed.
[^List_noOpaqueBackground_OK.png]



> 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: 05_before_fix_font_16_debug_colors.jpg, 
> 05_before_for_for_fonts50_debug_colors.jpg, 06_fix_font_16_debug_colors.jpg, 
> 06_fix_for_small_fonts_debug_colors.jpg, 
> 07_fix_useOpaqueBackground_font_50px.jpg, ListShiftedbackground.png, 
> List_noOpaqueBackground_OK.png, TestSparkList.zip, 
> fix_font_50_debug_colors.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)

Reply via email to