From cf34cdc52009262f71fca942ba1561fd04e4acd7 Mon Sep 17 00:00:00 2001 From: Nis Wechselberg Date: Wed, 9 May 2018 00:39:30 +0200 Subject: [PATCH] A small test for the display --- main.py | 26 ++++++++++++++++++++++++++ pyHomeControl.sublime-project | 11 +++++++++++ test.kv | 27 +++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 main.py create mode 100644 pyHomeControl.sublime-project create mode 100644 test.kv diff --git a/main.py b/main.py new file mode 100644 index 0000000..da53a58 --- /dev/null +++ b/main.py @@ -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() diff --git a/pyHomeControl.sublime-project b/pyHomeControl.sublime-project new file mode 100644 index 0000000..38f328e --- /dev/null +++ b/pyHomeControl.sublime-project @@ -0,0 +1,11 @@ +{ + "folders": + [ + { + "path": "." + }, + { + "path": "/usr/share/kivy-examples" + } + ] +} diff --git a/test.kv b/test.kv new file mode 100644 index 0000000..f31b011 --- /dev/null +++ b/test.kv @@ -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'