You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Justin Mclean <ju...@classsoftware.com> on 2017/02/12 03:57:41 UTC

[FlexJS] background colour bug

Hi,

Looks like this works (ie you get a big red square):

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:js="library://ns.apache.org/flexjs/basic">
    <js:valuesImpl>
        <js:SimpleCSSValuesImpl/>
    </js:valuesImpl>

    <js:initialView>
        <js:View percentWidth="100" percentHeight="100" style="background-color:red;">
        </js:View>
    </js:initialView>
</js:Application>

However using HTML RGB value like this doesn’t seem to work:

<js:initialView>
    <js:View percentWidth="100" percentHeight="100" style="background-color:#FF0000;">
    </js:View>
</js:initialView>

Anyone confirm and do you want me to raise a JIRA? I’m using a nightly from a few days ago.

Thanks,
Justin




Re: [FlexJS] background colour bug

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

This bug is in applyStyles in SimpleCSSCalueImpl.as, the applyStyles method have a list of styles it expect to see colour values in (colorStyles) but it’s looking for “”backgroundColor" not "background-color”.

Thanks,
Justin

Re: [FlexJS] background colour bug

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

I've raised a JIRA for this:
https://issues.apache.org/jira/browse/FLEX-35261 <https://issues.apache.org/jira/browse/FLEX-35261>

Thanks,
Justin

Re: [FlexJS] background colour bug

Posted by Harbs <ha...@gmail.com>.
Confirmed.

It looks like it parses the color into an integer value, and it never gets saved as a hex value in the styles.

> On Feb 12, 2017, at 5:57 AM, Justin Mclean <ju...@classsoftware.com> wrote:
> 
> Hi,
> 
> Looks like this works (ie you get a big red square):
> 
> <?xml version="1.0" encoding="utf-8"?>
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>                xmlns:js="library://ns.apache.org/flexjs/basic">
>    <js:valuesImpl>
>        <js:SimpleCSSValuesImpl/>
>    </js:valuesImpl>
> 
>    <js:initialView>
>        <js:View percentWidth="100" percentHeight="100" style="background-color:red;">
>        </js:View>
>    </js:initialView>
> </js:Application>
> 
> However using HTML RGB value like this doesn’t seem to work:
> 
> <js:initialView>
>    <js:View percentWidth="100" percentHeight="100" style="background-color:#FF0000;">
>    </js:View>
> </js:initialView>
> 
> Anyone confirm and do you want me to raise a JIRA? I’m using a nightly from a few days ago.
> 
> Thanks,
> Justin
> 
> 
>