You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Comrad/app/screens/login/login.kv

134 lines
3.2 KiB
Plaintext

#:import LoginScreen screens.login.login.LoginScreen
4 years ago
#: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
4 years ago
<LoginBoxLayout>:
id: loginbox
orientation:'vertical'
cols:1
size_hint:0.5,None
4 years ago
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:'25dp'
adaptive_height: True
<UsernameLayout>:
cols:2
orientation:'horizontal'
adaptive_height: True
size_hint:1,None
# pos_hint:{'right':0.9}
# spacing:'100sp'
# md_bg_color:1,1,0,1
<UsernameLabel>:
theme_text_color: 'Custom'
text_color: 1,0,0,1
# width:'100sp'
adaptive_width: True
size_hint:None,None
# md_bg_color:1,0,0,1
# pos_hint: {'y':1}
halign:'center'
4 years ago
<UsernameField>:
id: username
text: ""
4 years ago
hint_text: "username"
required: True
write_tab: False
multiline: False
helper_text_mode: "persistent"
4 years ago
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
error_color:1,0,0,1
pos_hint: {'center_x':0.5,'y':0.2}
size_hint:0.8,None
4 years ago
<PasswordField>:
id: password
text: ""
4 years ago
password: True
hint_text: "password"
required: True
write_tab: False
multiline: False
helper_text_mode: "persistent"
4 years ago
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':0.5,'y':0.2}
size_hint:0.8,None
4 years ago
<LoginButtonLayout>:
id: buttonbox
orientation:'horizontal'
cols: 2
# size_hint_y: None
4 years ago
adaptive_width: True
height: '56dp'
spacing: '25dp'
padding: '10dp'
# md_bg_color:1,1,0,1
size_hint:None,None
pos_hint: {'center_x': .5}#, 'bottom':1}
4 years ago
<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
size_hint:None,None
# pos_hint: {'center_x': .5, 'bottom':1}
4 years ago
<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
# size_hint:1,None
4 years ago
<LoginStatus>:
id: login_status
text:""
theme_text_color: 'Error'
size_hint:1,1
halign:'center'
pos_hint:{'center_x':.5, 'center_y':0.5}
4 years ago
4 years ago
<LoginScreen>:
name: "login"
id: login_screen
4 years ago
# LoginBoxLayout:
# UsernameField:
# PasswordField:
# LoginButtonLayout:
# LoginButton:
# RegisterButton:
# LoginStatus: