-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.kv
169 lines (142 loc) · 4.32 KB
/
main.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<LoadingScreen>:
BoxLayout:
height: root.height
width: root.width
orientation: 'vertical'
spacing: -200
LoadingSpinner:
canvas.before:
PushMatrix
Rotate:
angle: self.angle
axis: 0, 0, 1
origin: self.center
canvas.after:
PopMatrix
Image:
size_hint: None, None
size: 100, 100
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
source:"./assets/icons/loading1.png"
Label:
text: 'loading..'
font_size: 30
font_name: './fonts/1.ttf'
color: [1,1,1,1]
<LoginScreen>:
canvas.before:
Color:
rgba: [0.01,0.14,0.494,1]
Rectangle:
size: self.size
pos: self.pos
<WifiScreen>:
canvas.before:
Color:
rgba: [0.01,0.14,0.494,1]
Rectangle:
size: self.size
pos: self.pos
<HomeScreen>:
SlideComponent:
mbr: menubar
height: root.height
width: root.width
MenuBar:
id: menubar
<SettingsScreen>:
Image:
source: './assets/images/menubg.jpg'
height: 400
width: 1280
BoxLayout:
width: 1280
height: 400
orientation:'vertical'
BoxLayout:
size_hint: (1, 0.2)
canvas.before:
Color:
rgba: 0, 0, 0, 0.3
Rectangle:
pos: self.pos
size: self.size
StackLayout:
padding: 20
spacing: 20
orientation: 'lr-tb'
BackButton:
Label:
text: 'Settings'
font_size: 30
size_hint_x: None
size: self.texture_size
BoxLayout:
padding: 40
orientation: 'vertical'
GridLayout:
cols: 1
StackLayout:
orientation: 'lr-tb'
Label:
text: 'Change font size:'
font_size: 20
font_name: './fonts/3.ttf'
size_hint_x: None
size: self.texture_size
StackLayout:
orientation: 'lr-tb'
SliderComponent:
fontLabel: sliderLabel
orientation: 'horizontal'
StackLayout:
orientation: 'lr-tb'
SliderLabel:
id: sliderLabel
font_name: './fonts/5.ttf'
size_hint_x: None
size: self.texture_size
BoxLayout:
size_hint: [1,0.2]
orientation: 'horizontal'
spacing: 60
Button:
text: 'Connect to wifi'
on_release: root.connect_wifi()
background_color: [0.2, 0.7, 0.8, 1]
size_hint: [0.3,1]
color: [0,0,0,1]
bold: True
background_normal: ''
Button:
text: 'Logout'
on_release: root.logout()
background_color: [0.6, 0, 0, 1]
size_hint: [0.3,1]
color: [1,1,1,1]
bold: True
background_normal: ''
# components
<ShadowLabel>:
canvas.before:
Color:
rgba: root.tint
Rectangle:
pos:
int(self.center_x - self.texture_size[0] / 2.) + root.decal[0],\
int(self.center_y - self.texture_size[1] / 2.) + root.decal[1]
size: root.texture_size
texture: root.texture
Color:
rgba: 1, 1, 1, 1
<MenuButton>:
canvas.before:
Color:
rgba: 0.9, 0.9, 0.9, 0.2
RoundedRectangle:
pos: self.pos
size: self.size
radius: [(0, 0), (0, 0), (0, 0), (10, 10)]
<MenuBar>:
anchor_x: 'right'
anchor_y: 'top'