import win.ui;
/*DSG{{*/
var winform = ..win.form( bottom=399;parent=...;text="HTMLayout 显示图标(ico文件)";right=599 )
winform.add( )
/*}}*/
import web.layout;
var wbLayout = web.layout(winform);
wbLayout.html = /*********
<html>
<head>
<style>
img {
assigned!:
self.src = "data:image/x-icon;base64,
AAABAAMAMDAAAAEACACoDgAANgAAACAgAAABAAgAqAgAAN4OAAAQEAAAAQAIAGgF
AACGFwAAKAAAADAAAABgAAAAAQAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AACZMwAAmjQAAJw2AACeOAAAnzsGAKA6AACiPAAApD4AAKI+BACmQAAAp0MFAKhC
AACqRAAArEYAAK5IAACvSwUApEIIAKVDDACuTQ0AsEoAALJMAAC0TgAAsk0FALZQ
AAC1UgcAuFIAALpUAAC8VgAAuVUFAL5YAAC1VAwAulgKAL9fDAChQxQAtVgWALtb
EAC7XhYAsFQYALxiGgC7YR0ArVMhALVdJACwWSgAvGQlALlnMADAWgAAwlwAAMRe
AADGYAAAyGIAAMpkAADMZgAAzmgAAMVkDQDJZggAyWgLAMppDQDQagAA0mwAANRu
AADQbwwA1nAAANNwBwDVcQQA2HIAANp0AADcdgAA3ngAAN97BgDefg8Ax2gSAMlq
EQDGaxwA0nMTANV2EgDVeBQA3H0SANF2GwDUeBkA1XseANh8GQDgegAA4nwAAOR+
AADifwcAwWomAMd0LgDHdTEAzX03ALNmQAC2a0EAv39fAN6FHgDmgAAA5IAHAOiC
AADqhAAA7IYAAO6IAADhgQ4A6IgPAOGBEADmhhAA4IMVAOOGFgDrjBAA7I0QAOCH
HwDhiB8A5YsdAOuRHwDwlBcA8ZcdANqBIQDYgysA3YktAN6MMQDdjTUA04U9AOGK
JQDnjyQA6I4gAOCJKADljykA4Y0tAOuUIgDvliAA55EpAPGYIQDxmiYA8pwqAPKe
LQDrmDAA65s1AOKVPwDmmT8A6Jg5APGeMADyoDEA8qE1APKjOADzpDoA86U9ANiN
QwDelUkAwoJfAOCTQADpnUEA5J5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ASEBASEhAQEhIQEhIQEBkZ
EA4KDBkaGRcODAsWGhkfEyJ2OAQJGhwPLz0QBRIhN2eTlDsRCQEwg5ZXGBICBlad
oKExHxMDiZlBKyUaDQZWoVppNCEZCIyNNTYqIBYMRVtDW19JJBBSU09sUzQaDTJQ
fXptYkAKGleAe2NKGwqwimhvZS05Rw4HOmZGSCggsLCwgjxEgYwVEwAOTJYpI7Cw
sLB+mpWIHhwLFEughiawsLCwf5FqaychER2OkmQzsLCwsFV4TWBdPxcuh05cXrCw
sLA+bH15YVRCLFl8cGGwsLCwsIV3eWxYhLCLdW9usLCwsLCwsHJ0sLCwsLBzcQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAOAAAADwAAAA8AAAAPAA
AADwAAAA+BAAAP58AAA=";
}
img#the-img {
border:2px dotted silver;
}
input#img-size {
vertical-align: middle;
value-changed!:
img = $1(img#the-img),
img::width = self:value, //注意在脚本中,value是一个状态值,需要用冒号作为成员操作符
img::height = self:value
;
}
body{
font:system;
}
</style>
</head>
<body>
HTMLayout 根据节点设定的 width,height 属性,显示复合图标中最合适的分辨率<br />
<img />
<img width=32 height=32 />
<img width=48 height=48 />
<hr/>
最小显示: <img style="width:min-intrinsic; height:min-intrinsic;" />
最大显示: <img style="width:max-intrinsic; height:max-intrinsic;" />
<hr/>
拖动滑块调整图标大小 (单位 1px)<input type="hslider" #img-size value=16 max=256 min=1 />(255px) of<br/>
the image: <img #the-img />.
</body>
</html>
*********/
winform.show()
win.loopMessage();
|