fix: 恢复 language.ui 为原版 Text widget

VBox 是布局容器不支持 click 事件,导致:
- 语言代码不显示(VBox 无 otext)
- 点击无反应(VBox 不触发 click bind)
- 语言切换后代码不更新(缺少 app lang bind)

恢复为 Text widget + Popup click + lang event bind
This commit is contained in:
yumoqing 2026-06-29 13:26:29 +08:00
parent 422f93c7f1
commit df0f50e4f7

View File

@ -1,32 +1,13 @@
{
"id":"language",
"widgettype":"VBox",
"widgettype":"Text",
"options":{
"tip":"change UI language",
"i18n":true,
"otext":"{{params_kw._lang}}",
"cwidth": 4,
"css":"clickable"
},
"subwidgets":[
{
"widgettype":"Svg",
"options":{
"url":"{{entire_url('language.svg')}}",
"rate":2,
"valign":"center",
"halign":"center"
}
},
{
"widgettype":"Text",
"id":"lang_label",
"options":{
"i18n":false,
"otext":"{{params_kw._lang}}",
"cwidth":4,
"css":"text-center",
"cfontsize":0.6
}
}
],
"binds":[
{
"wid":"self",
@ -47,7 +28,7 @@
"wid":"app",
"event":"lang",
"actiontype":"script",
"target":"lang_label",
"target":"self",
"script":"this.set_otext(bricks.app.lang)"
}
]