2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-09 13:10:44 +00:00
Comrad/app/screens/login/login.kv

98 lines
2.4 KiB
Plaintext
Raw Normal View History

2020-08-10 16:37:42 +00:00
#:import LoginScreen screens.login.login.LoginScreen
2020-08-12 06:49:14 +00:00
#:import LoginBoxLayout screens.login.login.LoginBoxLayout
#:import UsernameField screens.login.login.UsernameField
#:import PasswordField screens.login.login.PasswordField
#:import LoginButtonLayout screens.login.login.LoginButtonLayout
#:import LoginButton screens.login.login.LoginButton
#:import RegisterButton screens.login.login.RegisterButton
#:import LoginStatus screens.login.login.LoginStatus
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
<LoginBoxLayout>:
id: loginbox
orientation:'vertical'
cols:1
size_hint:0.5,0.2
pos_hint: {'center_x':0.5,'center_y':0.5}
md_bg_color: 0,0,0,1
radius:[20,]
border_radius:20
spacing:'10dp'
padding:'10dp'
<UsernameField>:
id: username
hint_text: "username"
required: True
write_tab: False
multiline: False
2020-08-17 16:23:40 +00:00
helper_text_mode: "persistent"
2020-08-12 06:49:14 +00:00
color_mode: 'custom'
line_color_focus: 1,0,0,1
line_color_normal: 1,0,0,1
current_hint_text_color: 1,0,0,1
2020-08-17 16:23:40 +00:00
error_color:1,0,0,1
2020-08-12 06:49:14 +00:00
# pos_hint: {'x':1,'y':0.8}
# size_hint:(None,None)
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
<PasswordField>:
id: password
password: True
hint_text: "password"
required: True
write_tab: False
multiline: False
2020-08-17 16:23:40 +00:00
helper_text_mode: "persistent"
2020-08-12 06:49:14 +00:00
color_mode: 'custom'
line_color_focus: 1,0,0,1
line_color_normal: 1,0,0,1
current_hint_text_color: 1,0,0,1
text_color: 1,0,0,1
# pos_hint: {'center_x':1,'y':0.8}
# size_hint:(None,None)
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
<LoginButtonLayout>:
id: buttonbox
size_hint_y: None
adaptive_width: True
height: '56dp'
spacing: '10dp'
pos_hint: {'center_x': .5}
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
<LoginButton>:
text: "login"
on_release:
app.login(self.parent.parent.parent.username_field.text, self.parent.parent.parent.password_field.text)
#app.root.change_screen("welcome")
theme_text_color: "Custom"
text_color: 1,0,0,1
md_bg_color: 0,0,0,1
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
<RegisterButton>:
text: "register"
on_release:
app.register(self.parent.parent.parent.username_field.text, self.parent.parent.parent.password_field.text)
theme_text_color: "Custom"
text_color: 1,0,0,1
md_bg_color: 0,0,0,1
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
<LoginStatus>:
id: login_status
text:""
theme_text_color: 'Error'
pos_hint:{'center_x':.5}
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
<LoginScreen>:
name: "login"
id: login_screen
2020-08-10 16:37:42 +00:00
2020-08-12 06:49:14 +00:00
# LoginBoxLayout:
# UsernameField:
# PasswordField:
# LoginButtonLayout:
# LoginButton:
# RegisterButton:
# LoginStatus: