Created
May 22, 2013 07:39
-
-
Save Kovak/5625890 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from kivy.app import App | |
| from kivy.uix.widget import Widget | |
| class RootWidget(Widget): | |
| pass | |
| class TestApp(App): | |
| def build(self): | |
| pass | |
| if __name__ == '__main__': | |
| TestApp().run() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #:set COLOR_HIGHLIGHT (0.788235294, 0.643137255, 1) | |
| #:set COLOR_BACKGROUND (0.349019608, 0.082352941, 0.658823529) | |
| #:set COLOR_BACKGROUND_A50 (0.349019608, 0.082352941, 0.658823529, .5) | |
| #:set COLOR_BORDER (0.643137255, 0.160784314, 1) | |
| #:set COLOR_BORDER_A50 (0.643137255, 0.160784314, 1, .75) | |
| #:set COLOR_HIGHLIGHT_A50 (0.788235294, 0.643137255, 1, .5) | |
| RootWidget: | |
| <RootWidget>: | |
| FloatLayout: | |
| size: root.size | |
| pos: root.pos | |
| Button: | |
| pos_hint: {'x':.4, 'y': .4} | |
| size_hint: (.1, .1) | |
| text: 'rectangle' | |
| canvas.before: | |
| Color: | |
| rgb: COLOR_BORDER | |
| Line: | |
| width: 2. | |
| rectangle: (self.pos[0], self.pos[1], self.size[0], self.size[1]) | |
| joint: 'bevel' | |
| Button: | |
| text: 'ellipse' | |
| pos_hint: {'x': .6, 'y': .4} | |
| size_hint: (.1, .1) | |
| canvas.before: | |
| Color: | |
| rgb: COLOR_BORDER | |
| Line: | |
| width: 2. | |
| ellipse: (self.pos[0], self.pos[1], self.size[0], self.size[1]) | |
| joint: 'bevel' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment