Created
September 18, 2014 13:20
-
-
Save driscollis/2abb4e88104eb89eedb9 to your computer and use it in GitHub Desktop.
kv_login take two
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
<UsernameWidget>: | |
BoxLayout: | |
size: root.size | |
pos: root.pos | |
orientation: "horizontal" | |
Label: | |
text: "Username:" | |
TextInput: | |
font_size: 80, | |
size_hint_y: None, | |
height: 110 | |
<PasswordWidget>: | |
BoxLayout: | |
size: root.size | |
pos: root.pos | |
orientation: "horizontal" | |
Label: | |
text: "Password:" | |
TextInput: | |
font_size: 80, | |
size_hint_y: None, | |
height: 110 | |
password: True | |
<LoginScreen>: | |
BoxLayout: | |
orientation: "vertical" | |
size: root.size | |
pos: root.pos | |
UsernameWidget: | |
PasswordWidget: | |
Button: | |
text: "Login" | |
on_press: self.on_login |
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 UsernameWidget(Widget): | |
pass | |
class PasswordWidget(Widget): | |
pass | |
class LoginScreen(Widget): | |
pass | |
class LoginScreenApp(App): | |
def build(self): | |
screen = LoginScreen() | |
return screen | |
if __name__ == "__main__": | |
LoginScreenApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment