更改按钮颜色时图标的颜色 [英] Color of icon when changing color of button

查看:39
本文介绍了更改按钮颜色时图标的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个带图标的按钮.我想让按钮变成灰色,所以我更改了 chromeColor,但是当我这样做时,图标变暗了.


I have a button with an icon. I want to have the button in gray so I change the chromeColor but when I do that, the icon became darker.

左边的按钮没有改变颜色,右边的灰色按钮带有和较暗的图标.
如何在不改变图标颜色的情况下有一个灰色按钮?

On the left the button without changing the color, on the right, the gray button with and darker icon.
How can I have a gray button without changing the icon color ?

推荐答案

您可以通过修改外观类并将iconDisplay"添加到排除数组来实现此目的.最后,该行应如下所示:

You can do this by modifying the skin class and adding "iconDisplay" to the exclusion array. At the end the line should look like this:

static private const exclusions:Array = ["labelDisplay","iconDisplay"];

希望这会有所帮助.

这篇关于更改按钮颜色时图标的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆