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 dissapear on iPad 2 iOS6
Date Sun, 23 Feb 2014 12:53:19 GMT

    [ 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/23/14 12:51 PM:
-------------------------------------------------------------------

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]




was (Author: mamsellem):
I think I found the root cause :-)
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 dissapear on iPad 2 iOS6
> ----------------------------------------------------
>
>                 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