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:
parent
422f93c7f1
commit
df0f50e4f7
@ -1,32 +1,13 @@
|
|||||||
{
|
{
|
||||||
"id":"language",
|
"id":"language",
|
||||||
"widgettype":"VBox",
|
"widgettype":"Text",
|
||||||
"options":{
|
"options":{
|
||||||
"cwidth":4,
|
"tip":"change UI language",
|
||||||
|
"i18n":true,
|
||||||
|
"otext":"{{params_kw._lang}}",
|
||||||
|
"cwidth": 4,
|
||||||
"css":"clickable"
|
"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":[
|
"binds":[
|
||||||
{
|
{
|
||||||
"wid":"self",
|
"wid":"self",
|
||||||
@ -35,7 +16,7 @@
|
|||||||
"target":"Popup",
|
"target":"Popup",
|
||||||
"popup_options":{
|
"popup_options":{
|
||||||
"eventpos":true,
|
"eventpos":true,
|
||||||
"cwidth":11,
|
"cwidth": 11,
|
||||||
"cheight":10,
|
"cheight":10,
|
||||||
"dismiss_events":["command"]
|
"dismiss_events":["command"]
|
||||||
},
|
},
|
||||||
@ -47,7 +28,7 @@
|
|||||||
"wid":"app",
|
"wid":"app",
|
||||||
"event":"lang",
|
"event":"lang",
|
||||||
"actiontype":"script",
|
"actiontype":"script",
|
||||||
"target":"lang_label",
|
"target":"self",
|
||||||
"script":"this.set_otext(bricks.app.lang)"
|
"script":"this.set_otext(bricks.app.lang)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user