A small test for the display
This commit is contained in:
parent
96f5179430
commit
cf34cdc520
3 changed files with 64 additions and 0 deletions
26
main.py
Normal file
26
main.py
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
'''
|
||||||
|
Application built from a .kv file
|
||||||
|
==================================
|
||||||
|
|
||||||
|
This shows how to implicitly use a .kv file for your application. You
|
||||||
|
should see a full screen button labelled "Hello from test.kv".
|
||||||
|
|
||||||
|
After Kivy instantiates a subclass of App, it implicitly searches for a .kv
|
||||||
|
file. The file test.kv is selected because the name of the subclass of App is
|
||||||
|
TestApp, which implies that kivy should try to load "test.kv". That file
|
||||||
|
contains a root Widget.
|
||||||
|
'''
|
||||||
|
|
||||||
|
import kivy
|
||||||
|
kivy.require('1.0.7')
|
||||||
|
|
||||||
|
from kivy.app import App
|
||||||
|
from kivy.core.window import Window
|
||||||
|
|
||||||
|
class TestApp(App):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
Window.fullscreen = True
|
||||||
|
TestApp().run()
|
11
pyHomeControl.sublime-project
Normal file
11
pyHomeControl.sublime-project
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"folders":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/usr/share/kivy-examples"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
27
test.kv
Normal file
27
test.kv
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#:kivy 1.0
|
||||||
|
|
||||||
|
TabbedPanel:
|
||||||
|
id: tp
|
||||||
|
do_default_tab: False
|
||||||
|
tab_pos: 'left_top'
|
||||||
|
strip_border: [1,1,1,1]
|
||||||
|
|
||||||
|
TabbedPanelItem:
|
||||||
|
text: 'Lights'
|
||||||
|
GridLayout:
|
||||||
|
cols: 2
|
||||||
|
Button:
|
||||||
|
text: 'Balkon'
|
||||||
|
Slider:
|
||||||
|
min: 0
|
||||||
|
max: 100
|
||||||
|
Button:
|
||||||
|
text: 'Fenster'
|
||||||
|
Slider:
|
||||||
|
min: 0
|
||||||
|
max: 100
|
||||||
|
|
||||||
|
TabbedPanelItem:
|
||||||
|
text: 'Cinema'
|
||||||
|
Label:
|
||||||
|
text: 'Home Cinema controls'
|
Loading…
Reference in a new issue