Skip to content

Instantly share code, notes, and snippets.

@driscollis
Created September 18, 2014 13:20
Show Gist options
  • Save driscollis/2abb4e88104eb89eedb9 to your computer and use it in GitHub Desktop.
Save driscollis/2abb4e88104eb89eedb9 to your computer and use it in GitHub Desktop.
kv_login take two
<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
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