-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign.kv
107 lines (102 loc) · 3.02 KB
/
design.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<LoginScreen>:
GridLayout:
cols: 1
GridLayout:
cols: 1
padding: 15,15
spacing: 20,20
Label:
text:"User Login"
font_size: '20sp'
TextInput:
id:username
hint_text:"Username"
TextInput:
id:password
password: True
hint_text:"Password"
RelativeLayout:
Button:
text:"Login"
on_press:root.login(root.ids.username.text,root.ids.password.text)
size_hint: 0.3,0.5
pos_hint:{'center_x':0.5,'center_y':0.6}
Label:
id: login_wrong
text:""
GridLayout:
cols: 2
size_hint:0.2,0.2
padding:10,10
spacing:10,0
Button:
text:"Forgot Password?"
background_color:1,1,1,0
opacity:1 if self.state=='normal' else 0.5
color:0.1,0.7,1,1
Button:
text: "Sign Up"
background_color:1,1,1,0
opacity:1 if self.state=='normal' else 0.5
color:0.1,0.7,1,1
on_press:root.sign_up()
<SignUpScreen>:
GridLayout:
cols:1
Label:
text: "Sign up for Journey!!"
TextInput:
id: username
hint_text:"Username"
TextInput:
id: password
hint_text:"Password"
Button:
text:"Submit"
on_press:root.add_user(root.ids.username.text,root.ids.password.text)
<SignUpScreenSuccess>:
GridLayout:
cols:1
Label:
text:"Sign Up Successful!"
Button:
text: "Login Page"
on_press:root.go_to_login()
<LoginScreenSuccess>:
GridLayout:
cols:1
padding:30,30
spacing: 30,30
RelativeLayout:
ImageButton:
on_press: root.log_out()
source: 'logout_hover.png' if self.hovered else 'logout_nothover.png'
size_hint: 0.35,0.35
pos_hint:{'center_x':0.93, 'center_y':0.8}
Label:
text:"How do you feel?"
TextInput:
id:feeling
hint_text:"Things to try : Happy, Sad, Depressed or Lost..."
Button:
text:"Enlighten Me"
on_press:root.get_quote(root.ids.feeling.text)
ScrollView:
Label:
id:quote
text:""
text_size: self.width, None
size_hint_y:None
height:self.texture_size[1]
Label:
text:"Developed by Fazil Khan"
font_size: '9sp'
<RootWidget>:
LoginScreen:
name:"login_screen"
SignUpScreen:
name:"sign_up_screen"
SignUpScreenSuccess:
name:"sign_up_screen_success"
LoginScreenSuccess:
name:"login_screen_success"