Created
October 1, 2014 17:23
-
-
Save kived/08e10b150b4bab495bb4 to your computer and use it in GitHub Desktop.
Kivy: maintain aspect ratio
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
import kivy | |
kivy.require('1.8.1') | |
from kivy.app import App | |
from kivy.lang import Builder | |
root = Builder.load_string(''' | |
Button: | |
text: 'hi' | |
size_hint_y: None | |
height: .5*self.width | |
''') | |
class TestApp(App): | |
def build(self): | |
return root | |
if __name__ == '__main__': | |
TestApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment