-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathaudiojackgui.kv
190 lines (164 loc) · 5.86 KB
/
audiojackgui.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
#:kivy 1.9.1
<MainGUI>:
color_theme: (0.07, 0.21, 0.42, 1.0)
canvas.before:
Color:
rgba: root.color_theme
Rectangle:
size: self.size
pos: self.pos
StackLayout:
id: main_layout
orientation: 'tb-lr'
size_hint: (0.8, 1.0)
pos_hint: {'center_x': 0.5}
spacing: [0, 10]
Label:
# Logo
text: 'AudioJack'
font_size: '64sp'
size_hint: (1.0, 0.2)
BoxLayout:
size_hint: (1.0, 0.1)
TextInput:
# URL input
id: url_input
background_normal: ''
background_active: ''
hint_text: 'Enter a YouTube or SoundCloud URL'
font_size: '40sp'
size_hint: (0.9, 1.0)
multiline: False
padding: self.padding[0], (self.height - self.line_height) / 2
HoverableButton:
# Search button
id: btn_submit
size_hint: (0.1, 1.0)
text: 'Search'
# background_down: ''
background_normal: ''
Label:
# Error messages will be presented through this label
id: error_msg
color: (1, 0, 0, 1)
size_hint: (1.0, 0.08)
font_size: '20sp'
text: 'Error placeholder'
Label:
id: loading_msg
color: (1, 1, 1, 1)
size_hint: (1.0, 0.08)
font_size: '20sp'
text: 'Loading...'
HoverableButton:
# Button to open downloaded file
id: open_file_button
size_hint: (1.0, 0.08)
font_size: '20sp'
# background_down: ''
background_normal: ''
BoxLayout:
# Contains options to cut file
orientation: 'vertical'
id: cut_file
size_hint: (1.0, 0.3)
spacing: 5
pos_hint: {'center_x': 0.5}
Label:
text: 'Cut file'
font_size: '20sp'
color: (1, 1, 1, 1)
size_hint: (0.4, 0.3)
pos_hint: {'center_x': 0.5}
TextInput:
id: start_time
size_hint: (0.4, 0.25)
multiline: False
background_normal: ''
hint_text: 'Start time (s)'
font_size: '20sp'
padding: self.padding[0], (self.height - self.line_height) / 2
pos_hint: {'center_x': 0.5}
TextInput:
id: end_time
size_hint: (0.4, 0.25)
multiline: False
background_normal: ''
hint_text: 'End time (s)'
font_size: '20sp'
padding: self.padding[0], (self.height - self.line_height) / 2
pos_hint: {'center_x': 0.5}
HoverableButton:
text: 'Cut'
id: cut_file_btn
size_hint: (0.4, 0.2)
pos_hint: {'center_x': 0.5}
BoxLayout:
# Results
orientation: 'vertical'
id: results
size_hint: (1.0, 0.54)
Label:
id: results_label
text: 'Result information placeholder'
color: (1, 1, 1, 1)
font_size: '20sp'
size_hint: (1.0, 0.1)
ScrollView:
size_hint: (1.0, 0.9)
GridLayout:
cols: 1
size_hint_y: None
height: self.minimum_height
StackLayout:
# Results grid
orientation: 'lr-tb'
id: results_grid
size_hint_y: None
spacing: 10
BoxLayout:
# Custom selection
orientation: 'vertical'
id: custom_selection
size_hint_y: None
spacing: 4
height: '200px'
Label:
text: 'Custom selection'
font_size: '20sp'
size_hint_x: 0.5
pos_hint: {'center_x': 0.5}
TextInput:
hint_text: 'Title'
id: custom_title
size_hint_x: 0.5
pos_hint: {'center_x': 0.5}
padding: self.padding[0], (self.height - self.line_height) / 2
TextInput:
hint_text: 'Artist'
id: custom_artist
size_hint_x: 0.5
pos_hint: {'center_x': 0.5}
padding: self.padding[0], (self.height - self.line_height) / 2
TextInput:
hint_text: 'Album'
id: custom_album
size_hint_x: 0.5
pos_hint: {'center_x': 0.5}
padding: self.padding[0], (self.height - self.line_height) / 2
HoverableButton:
text: 'Go!'
id: submit_custom
size_hint_x: 0.5
pos_hint: {'center_x': 0.5}
<CoverArt>:
canvas.after:
Color:
rgba: (0, 0, 0, self.overlay)
Rectangle:
size: self.size
pos: self.pos
<HoverableButton>:
color: (0.07, 0.21, 0.42, 1.0)
background_color: (0.3, 0.5, 0.75, 1) if self.hover else (0.8, 0.9, 0.95, 1)
background_normal: ''