example_wt.py

来自「The major functionality added in this re」· Python 代码 · 共 31 行

PY
31
字号
# Example of a widget template for picosmimport PicoGUIapp = PicoGUI.Application('PicoGUI Login', PicoGUI.WTFile())app.name = "PSMApp"# A spiffy icon from KDE's Crystal icon seticon = app.addWidget('label')icon.side = 'left'icon.bitmap = open('kscreensaver.png').read()title = icon.addWidget('label')title.font = ':20:bold'title.text = 'Welcome to PicoGUI'subtitle = title.addWidget('textbox')subtitle.text = 'To begin your PicoGUI session, enter your username and password below. You may also sit here and stare at the pretty icon to the left of this message, or admire the fact that all these extra useless widgets were brought to you in a conveniently packaged Widget Template (tm) for your enjoyment.'subtitle.readonly = 1loginbox = subtitle.addWidget('box')loginbox.name = 'PSMLoginBox'passwdbox = loginbox.addWidget('box')passwdbox.name = 'PSMPasswdBox'buttonbox = passwdbox.addWidget('toolbar')buttonbox.side = 'bottom'buttonbox.name = 'PSMButtonBox'open("picosm.wt", 'w').write(app.server.dump())

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?