Search code examples
apache-flexbuttonshadowskin

Flex 3 - Shadow in custom skinned button


I'm having a hard time removing some type of shadow in a button control.

Here's the button:
enter image description here

The button that's giving me trouble is the "zoomer" one. As you can see, the borders are not straight. I assume that there's some kind of gradient/shadow or sth that's inherited from the default skin.

On rollover, the same issue appears but it's a little bit less visible:
enter image description here

I'm using css to skin it.
Here's the button's declaration:

<mx:Button id="zoomButton" 
           paddingLeft="7" paddingRight="7"
           height="24" textAlign="center" fontSize="10"
           buttonMode="true"
           styleName="intZoomButtonStyle"
           icon="{Assets.MISC_ZOOM_ICON_SMALL}"/>

And here's the css:

.intZoomButtonStyle{
    fill-colors: #ffffff, #ffffff;
    fill-alphas: 1, 1;
    border-color: #ffffff;
    shadow-color: #ffffff;
    theme-color: #ffffff;
    corner-radius: 0;
}

Could anyone help me on this one?

Thanks :)


Solution

  • I finally used an image to skin the button. This is how the css looks:

    .intZoomButtonStyle{
        fill-colors: #ffffff, #ffffff;
        fill-alphas: 1, 1;
        border-color: #ffffff;
        theme-color: #ffffff;
        corner-radius: 0;
    
        up-skin: Embed("assets/miscellaneous/blank.jpg");
        down-skin: Embed("assets/miscellaneous/blank.jpg");
        over-skin: Embed("assets/miscellaneous/blank.jpg");
    }
    

    blank.jpg is simply a white squared image.

    And voilà!
    It still bothers me not being able to do that using a simple css but well, found sth that works...