-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdroit2.kv
227 lines (201 loc) · 6.15 KB
/
Adroit2.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
ScreenManager:
id: screen_manager
LandingScreen:
name: 'landing'
id: landing_screen
manager: screen_manager
LyricsScreen:
name: 'Lyrics'
id: lyrics_screen
manager: screen_manager
HelpScreen:
name: 'Help'
<CustLabel@Label>
font_name: "data/fonts/Roboto-Medium.ttf"
color: 0, 0, 0, 1
<FlatTextInput2>:
canvas.before:
# Background
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
#Cursor
Color:
rgba: ( [0.4023,0.2265,0.7148,1] if self.focus else [ 0, 0, 0, 0 ] )
Rectangle:
pos: [int(x) for x in self.cursor_pos]
size: sp(2), -self.line_height
#Underline
Color:
rgba: [ 0, 0, 0, 0 ]
Rectangle:
size: ( self.size[0]-3, 1 )
pos: self.pos[0], self.cursor_pos[1] - self.line_height - 3
#Set text color
Color:
rgba: 0,0,0,1
<LandingScreen>:
search2: searchid
vid: switch_id1
vlclabelid: vlclabel
wid: switch_id2
wmplabelid: wmplabel
yid: switch_id3
ytlabel: ytubelabel
FloatLayout:
canvas.before:
Color:
rgba: .97, .97, .97, 0.99
Rectangle:
pos: self.pos
size: self.size
#source: 'data/adroit2.png'
Toolbar:
title: 'ADROIT'
md_bg_color: app.theme_cls.primary_color
background_palette: 'Primary'
background_hue: '500'
pos_hint: {'x':0, 'y':0.91}
size_hint_y: 0.09
CustLabel:
size: self.texture_size
text: "Smart Pause"
font_size: 25
pos_hint:{'x': 0,'y':0.19}
ImageButton:
pos_hint: {'x': 0.4, 'y': .73}
size_hint:(.2,.12)
on_press: root.controlSmartPause(self.flag, root)
CustLabel:
text:'CONTROLS'
pos_hint:{'x':-0.35,'y':-0.08}
font_size: 22
MDSwitch:
id: switch_id1
on_active: root.Switch_on_VLC(self, self.active, root.wid, root.yid)
pos_hint:{'x':0.18,'y':0.31}
size_hint: (0.05, 0.075)
CustLabel:
id: vlclabel
text:'VLC'
color: 0, 0, 0, 0.6
pos_hint:{'x':-0.41,'y':-0.15}
MDSwitch:
id: switch_id2
on_active: root.Switch_on_WMP(self, self.active, root.vid, root.yid)
pos_hint:{'x':0.18,'y':0.23}
size_hint: (0.05, 0.075)
CustLabel:
id: wmplabel
text:'WMP'
color: 0, 0, 0, 0.6
pos_hint:{'x':-0.41,'y':-0.23}
MDSwitch:
id: switch_id3
on_active: root.Switch_on_YouTube(self, self.active, root.wid, root.vid)
pos_hint:{'x':0.18,'y':0.14}
size_hint: (0.05, 0.075)
CustLabel:
id: ytubelabel
text:'YouTube'
color: 0, 0, 0, 0.6
pos_hint:{'x':-0.41,'y':-0.32}
MDSwitch:
id: switch_id
on_active: root.Switch_on_Telegram(self, self.active)
pos_hint:{'x':0.18,'y':0.05}
size_hint: (0.05, 0.075)
CustLabel:
text:'TELEGRAM'
pos_hint:{'x':-0.41,'y':-0.415}
MDSwitch:
id: switch_id
on_active: root.Switch_on_Prediction(self, self.active)
pos_hint:{'x':0.68,'y':0.28}
size_hint: (0.05, 0.09)
CustLabel:
text:'Playlist Prediction'
pos_hint:{'x':0.040,'y':-0.175}
font_size: 22
Search:
id: searchid
MDRaisedButton:
text: 'CURRENT'
on_press:
root.search2.update()
size_hint:(0.125,0.075)
pos_hint: {'x': .65, 'y': .5}
MDRaisedButton:
text: 'LYRICS'
on_press:
root.manager.current = 'Lyrics'
root.manager.transition.direction = 'left'
root.manager.ids.lyrics_screen.loadLyrics(root.search2.user_input.text)
size_hint:(.125,.075)
pos_hint: {'x': .79, 'y': .5}
MDRaisedButton:
text: "SUBTITLE"
on_press: root.downloadsub()
size_hint: (0.25, 0.09)
pos_hint:{'x':0.37,'y':0.075}
MDRaisedButton:
text: 'HELP'
size_hint:(.25,.09)
pos_hint: {'x': .7, 'y': .075}
on_press:
root.manager.current = 'Help'
root.manager.transition.direction = 'left'
<LyricsScreen>:
lyrics2: dispL
BoxLayout:
canvas.before:
Color:
rgba: .97, .97, .97, 0.99
Rectangle:
pos: self.pos
size: self.size
orientation: "vertical"
padding: 1
spacing: 5
MDRaisedButton:
text: 'Home Screen'
size_hint:(1, .10)
on_press:
root.manager.transition.direction = 'right'
root.manager.current = 'landing'
FlatTextInput2:
id: dispL
text: "Lyrics"
font_size: 20
font_name: "data/fonts/Roboto-Regular.ttf"
hint_text: "Name of song."
keyboard_mode: 'managed'
readOnly: True
<HelpScreen>:
helpid: helptextid
BoxLayout:
canvas.before:
Color:
rgba: .97, .97, .97, 1
Rectangle:
pos: self.pos
size: self.size
orientation: "vertical"
padding: 1
spacing: 8
MDRaisedButton:
text: 'Home Screen'
size_hint:(1, .10)
on_press:
root.manager.transition.direction = 'right'
root.manager.current = 'landing'
FlatTextInput2:
id: helptextid
font_size: 20
font_name: "data/fonts/Roboto-Regular.ttf"
keyboard_mode: 'managed'
readOnly: True
text: root.help_text
cursor: (0,0)