Created
July 15, 2013 05:08
-
-
Save Kovak/5997629 to your computer and use it in GitHub Desktop.
This file contains 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 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
RootWidget: | |
<RootWidget>: | |
FloatLayout: | |
size: root.size | |
pos: root.pos | |
BoxLayout: | |
text1: text1 | |
orientation: "vertical" | |
size_hint_y: None | |
height: 120 | |
padding: (0, (self.height - text1.texture_size[1]*4)/2) | |
canvas: | |
Color: | |
rgb: 1, 0, 0 | |
Rectangle: | |
pos: self.pos | |
size: self.size | |
Label: | |
id: text1 | |
text: '1' | |
halign: "left" | |
valign: "top" | |
size_hint: (None, None) | |
size: self.texture_size | |
Label: | |
text: '2' | |
halign: "left" | |
valign: "middle" | |
color: (0, 1, 0, 1) | |
size_hint: (None, None) | |
size: self.texture_size | |
Label: | |
halign: "left" | |
valign: "middle" | |
text: '3' | |
size_hint: (None, None) | |
size: self.texture_size | |
Label: | |
halign: "left" | |
valign: "bottom" | |
text: '4' | |
size_hint: (None, None) | |
size: self.texture_size | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment