简体   繁体   English

为什么在弹出窗口中打开时,我的rect填充不同的颜色?

[英]Why is my rect fills a different color when opening in a popup?

I'm adding a Group that contains a Rect fill inside a panel. 我要在面板中添加一个包含Rect填充的组。 The panel contains two states normal and normalWithControlBar. 该面板包含正常和normalWithControlBar两个状态。 The group is in the normalWithControlBar. 该组位于normalWithControlBar中。 In an isolated test it works correctly. 在隔离测试中,它可以正常工作。 When it is displayed in my application the Rect background fill does not appear with the correct color. 当它在我的应用程序中显示时,Rect背景填充不会以正确的颜色显示。

I think that there may be blendMode being set somewhere but I'm not sure if that's it or where and why it is being applied. 我认为可能在某个地方设置了blendMode,但我不确定是否是它,或者在哪里以及为什么应用它。

I also have Rotate3D effect that may be the cause of it. 我也有可能是Rotate3D效果的原因。 Since it is a large application I'm working my way through what it could be but until then has anyone heard of this or what could be causing it? 由于它是一个大型应用程序,因此我正在尽力解决可能出现的问题,但是在此之前,还没有人听说过此问题或可能由什么原因引起的吗? Thanks 谢谢

Example code: 示例代码:

In Panel: 在面板中:

<MyPanel>
    <s:controlBarContent>
        <local:MyGroup width="500" height="230"/><!--appears tinted-->
    </s:controlBarContent>

    <local:MyGroup width="500" height="230"/><!--appears normal-->
</MyPanel>

In MyGroup: 在MyGroup中:

<s:Rect width="100%" height="80"
        top="100"
            >
    <s:fill>
        <s:SolidColor color="#dddddd"/>
    </s:fill>
</s:Rect>

Found it. 找到了。 The reason it is happening is because the Group was not added to the list of exclusions in the Panel's skin class and a chromeColor was specified in the Application CSS. 发生这种情况的原因是,该组未添加到面板的外观类的排除列表中,并且在Application CSS中指定了chromeColor。

In MyPanelSkin: 在MyPanelSkin中:

Before: 之前:

/* Define the skin elements that should not be colorized. */
static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "border"];

After: 后:

/* Define the skin elements that should not be colorized. */
static private const exclusions:Array = ["myGroup", "background", "titleDisplay", "contentGroup", "controlBarGroup", "border"];

Once I added my skin part to the list of exclusions the fill color displayed correctly. 将皮肤部分添加到排除列表后,填充颜色将正确显示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM