add script test
This commit is contained in:
parent
20f00688a8
commit
f8c0dbedc0
18
test/script/conf/config.json
Normal file
18
test/script/conf/config.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"font_sizes":{
|
||||||
|
"smallest":1.5,
|
||||||
|
"small":2.5,
|
||||||
|
"normal":3.5,
|
||||||
|
"large":4.5,
|
||||||
|
"huge":5.5,
|
||||||
|
"hugest":6.5
|
||||||
|
},
|
||||||
|
"font_name":"normal",
|
||||||
|
"script_root":"$[workdir]$/scripts",
|
||||||
|
"root":{
|
||||||
|
"widgettype":"urlwidget",
|
||||||
|
"options":{
|
||||||
|
"url":"file://index.tmpl"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
test/script/main.py
Normal file
10
test/script/main.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from kivyblocks.blocksapp import BlocksApp
|
||||||
|
from kivyblocks.blocks import registerWidget, Blocks
|
||||||
|
import kivyblocks.register
|
||||||
|
|
||||||
|
|
||||||
|
class ScriptApp(BlocksApp):
|
||||||
|
pass
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
ScriptApp().run()
|
12
test/script/scripts/index.tmpl
Normal file
12
test/script/scripts/index.tmpl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"widgettype":"VBox",
|
||||||
|
"options":{},
|
||||||
|
"subwidgets":[
|
||||||
|
{
|
||||||
|
"widgettype":"Button",
|
||||||
|
"options":{
|
||||||
|
"text":"Hello"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user