1185907650 发表于 2021-11-30 09:26:05

火山视窗布局组件自定义图标案例

一、创建图标①官方要求:图片文件要求如下: 格式为BMP,尺寸24x24像素,颜色深度32位,透明背景色为洋红(RGB颜色分量: 255, 0, 255).images/ctrl_icons.bmp
②开始制作可以选择Fireworks或PhotoShop,这里我就用Fireworks来演示按要求设置尺寸和色值https://www.lkuaiy.com/image/editor/1638190450819870.pnghttps://www.lkuaiy.com/image/editor/1638190454483741.pnghttps://www.lkuaiy.com/image/editor/1638190459532123.png
创建完成后,如下图样式https://www.lkuaiy.com/image/editor/1638190465799414.png
③添加个图标选择导入,事先准备好的png透明图标https://www.lkuaiy.com/image/editor/1638190471401733.png
完成后如下图https://www.lkuaiy.com/image/editor/1638190476529902.png
④保存图标https://www.lkuaiy.com/image/editor/1638190482349981.pnghttps://www.lkuaiy.com/image/editor/1638190485846343.png
二、自定义布局ctrl+I创建个布局器,然后设置如下图标代码:"icon=\"abc.bmp\"\r\ndefault_size = \"216, 116\""与源码同目录,所以不需要设置路径图标也可以添加路径如:"icon=\"images/abc.bmp\"\r\ndefault_size = \"216, 116\""https://www.lkuaiy.com/image/editor/1638190537369232.pnghttps://www.lkuaiy.com/image/editor/1638190541165932.pnghttps://www.lkuaiy.com/image/editor/1638190545289534.png
三、查看效果打开设计器,就可以看到效果了https://www.lkuaiy.com/image/editor/1638190559077169.png
四、演示https://www.lkuaiy.com/image/editor/1638190573559300.gif
本博客转载自利快云,原文地址:https://www.lkuaiy.com/ArticleForumInsidePage?page=1&id=16381906663214828
页: [1]
查看完整版本: 火山视窗布局组件自定义图标案例