Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWTK中有没有办法自定义字体式的icon?或者用矢量图自定义图形? #896

Open
Tracker647 opened this issue Sep 12, 2024 · 2 comments

Comments

@Tracker647
Copy link

Tracker647 commented Sep 12, 2024

image
要实现这么一个效果,定义几个窗口样式,选中这些窗口样式的时候窗口会变成蓝色。
如果是在html中,记得有个叫iconfont的机制,可以把icon当成字体一样使用,如果遇到事件变色的话icon会像字体一样变色,跟控件同步,不需要额外写页面代码,或者图片(上面那个如果要快速实现就是10个图片)不知道awtk中有没有类似的机制。

现在的做法就是通过特殊字符网站,导入想要的字符进去,比如写一个这样的选择箱,里面的三角形按钮要求变色,我就直接用了这网站的▶◀两个字符,但这个的方法的缺陷就是,网站的字符有限,部分字符在awtk上还无法显示,设置打出来显示⛝
image

问下除了弄自定义控件,或者自己专门一个c文件做这部分页面逻辑还有什么好办法吗?mvvm上,实在不想多费代码。

@Tracker647
Copy link
Author

add:三角形按钮在浏览器的显示和在awtk上不一样,awtk应该和特殊字符网站的一致。
image

@xianjimli
Copy link
Member

看看这个是不是你需要的:https://github.com/zlgopen/awtk-widget-shape

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants