Select to view content in your preferred language

image placed in the skin mxml displayed darkened

932
3
Jump to solution
01-19-2014 10:25 PM
sidneykelvin
Emerging Contributor
I created a skin mxml in Viewer for Flex and placed an image in the title bar. the image was found darkened.
Reference please found attached a clip of the display I get.

What have I done wrong?

Thanks in advance.

In the skin.mxml
........
                <!-- layer 3: text -->
                <!--- @copy spark.components.Panel#titleDisplay -->
    <s:HGroup>
     <s:BitmapImage id="panelIcon" source="@Embed(source='../../assets/images/cedd/logo.jpg')"
                                                                  left="5" width="40"/>
     <s:Label id="titleDisplay" maxDisplayedLines="1"
        left="9" right="36" top="1" bottom="0" minHeight="30"
        verticalAlign="middle" fontWeight="bold" />
    </s:HGroup>
.........
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Sidney,

   Your panelIcon has to added to the colorize exclusions array:

/* Define the skin elements that should not be colorized.          For panel, border and title background are skinned, but the content area, background, border, and title text are not. */         static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "border", "panelIcon"];                      /* exclusions before Flex 4.5 for backwards-compatibility purposes */         static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "panelIcon"];

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Sidney,

   Your panelIcon has to added to the colorize exclusions array:

/* Define the skin elements that should not be colorized.          For panel, border and title background are skinned, but the content area, background, border, and title text are not. */         static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "border", "panelIcon"];                      /* exclusions before Flex 4.5 for backwards-compatibility purposes */         static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "panelIcon"];
0 Kudos
sidneykelvin
Emerging Contributor
It works !
Thank you very much
😉
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Sidney,

  Don't forget the most important step, marking the post as answered (step 1 in the attached graphic).

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

0 Kudos