将 Flex 3.5 项目转换为 Flex 4.0 - 样式警告

发布于 2024-09-25 04:52:50 字数 1260 浏览 2 评论 0原文

我正在将我的项目从 Flex 3.5 平台转移到 Flex 4.0。我能够删除所有编译时错误。我只剩下大约。 1000 条警告,全部都在样式上。

我已经使用了所有 mx 组件,因为之前我的项目是在 Flex 3.5 中。我无法更改控件,因为这会妨碍他们的外观和视野。我在控件上应用的所有样式,其中一些现在已被弃用。请在 Flex 4 中为它们建议一个解决方法。

属性为:

Button -> fillColor、fillApha

画布 -> borderThickness

组合框 -> borderColor、themeColor、fillColor、fillApha

TextArea -> backgroundColor、backgroundAlpha、themecolor、cornerRadius

TextInput -> backgroundColor、backgroundAlpha、themeColor

所有这些属性在 mxml 组件中都是不允许的,并且它们也会在 CSS 文件中发出警告。我还在 CSS 文件的开头包含了命名空间:

@namespace "http://www.adobe.com/2006/mxml";

@namespace mx“library://ns.adobe.com/flex/mx”;

@namespace fx“library://ns.adobe.com/flex/spark”;

@命名空间flexlib“http://code.google.com/p/flexlib/”;

mx|CheckBox.shadeChk { upIcon:嵌入(源=“资产/图像/CL_collapse_close.png”); overIcon:嵌入(源=“资产/图像/CL_collapse_close.png”); downIcon:嵌入(源=“资产/图像/CL_collapse_close.png”); selectedUpIcon:嵌入(源=“资产/图像/CL_collapse_open.png”); selectedOverIcon:嵌入(源=“资产/图像/CL_collapse_open.png”); selectedDownIcon:嵌入(源=“assets/images/CL_collapse_open.png”); 左填充:0;右填充:0; 顶部填充:0;底部填充:0; .....

请指导我如何在 Spark 主题中获得与 Flex 4 相同的 UI

谢谢, 尼蒂卡

I am shifting my project from Flex 3.5 platform to Flex 4.0. I am able to remove all compile time errors. All I am left with is approx. 1000 warnings and all are on styles.

I have used all mx components as earlier my project was in Flex 3.5. and i cannot change the controls to because it will hamper their look and field. All the styles that I have applied on controls, some of them are now depreciated. Please suggest a workaround for them in flex 4.

Properties are:

Button - > fillColor, fillApha

Canvas -> borderThickness

ComboBox -> borderColor, themeColor, fillColor, fillApha

TextArea -> backgroundColor, backgroundAlpha, themecolor, cornerRadius

TextInput -> backgroundColor, backgroundAlpha, themeColor

All these properties are not allowed in mxml components and they are giving warnings in CSS files also. I have included namespaces also in the beginning of CSS file as:

@namespace "http://www.adobe.com/2006/mxml";

@namespace mx "library://ns.adobe.com/flex/mx";

@namespace fx "library://ns.adobe.com/flex/spark";

@namespace flexlib "http://code.google.com/p/flexlib/";

mx|CheckBox.shadeChk
{
upIcon: Embed(source="assets/images/CL_collapse_close.png");
overIcon: Embed(source="assets/images/CL_collapse_close.png");
downIcon: Embed(source="assets/images/CL_collapse_close.png");
selectedUpIcon: Embed(source="assets/images/CL_collapse_open.png");
selectedOverIcon: Embed(source="assets/images/CL_collapse_open.png");
selectedDownIcon: Embed(source="assets/images/CL_collapse_open.png");
paddingLeft: 0; paddingRight: 0;
paddingTop: 0; paddingBottom: 0;
}

.....

Please guide me how can i get the same UI with Flex 4 in spark theme.

Thanks,
Nitika

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

混浊又暗下来 2024-10-02 04:52:50

按钮 FillColor 和 FillAlpha 需要在 Spark 皮肤中指定,或者您可以指定按钮使用光环皮肤,然后您可以在 CSS 文件或 fx:Style 标记中指定它们。

    fillAlphas: 0.8, 0.8, 0.65, 0.65;
fillColors: #B9d6ff, #99C2FF, #B9d6ff, #99C2FF;
skin: ClassReference("mx.skins.halo.ButtonSkin");

你能把Canvas改成as:BorderContainer吗? s:BorderContainer 具有可以在 MXML 中设置的 BorderWeight 属性。

对 TextArea 和 TextInput 尝试上面的建议(将皮肤设置为光环皮肤),否则默认情况下您将获得 Spark 皮肤,并且必须创建自定义皮肤。

Button FillColor and FillAlpha need to be specified in a skin for spark skins, or you can specify to use the halo skin for the button and then you can specify them in a CSS file or fx:Style tag.

    fillAlphas: 0.8, 0.8, 0.65, 0.65;
fillColors: #B9d6ff, #99C2FF, #B9d6ff, #99C2FF;
skin: ClassReference("mx.skins.halo.ButtonSkin");

Can you change the Canvas to a s:BorderContainer? s:BorderContainer has the BorderWeight property that can be set in MXML.

Try the Suggestion above (with setting the skin to the halo skin) for TextArea and TextInput, otherwise you will get a spark skin by default and you will have to create a custom skin.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文