-
Notifications
You must be signed in to change notification settings - Fork 0
/
mywidget.kv
69 lines (62 loc) · 1.95 KB
/
mywidget.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
<MyWidget>:
orientation: 'vertical'
video: video_widget.__self__
Video:
id: video_widget
source: 'background.mp4'
options: {'fit_mode': 'contain'}
state: 'play'
options: {'eos': 'loop'}
allow_stretch: True
size_hint: (1, 1)
Label:
id: title_label
text: 'PARKING PIXELS'
font_size: '60sp'
bold: True
color: (1, 1, 0, 1) # Yellow color
pos_hint: {'center_x': 0.5, 'center_y': 0.8}
halign: 'center'
BoxLayout:
orientation: 'vertical'
size_hint: (None, None)
size: (300, 400)
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
MDRoundFlatButton:
id: btn1
text: 'Select Video'
size_hint: (1, 0.1)
md_bg_color: (1, 1, 0, 1) # Yellow color
text_color: (0, 0, 0, 1) # Black text color
font_size: '20sp'
on_press: root.select_video()
MDRoundFlatButton:
id: btn2
text: 'Set Region'
size_hint: (1, 0.1)
md_bg_color: (1, 1, 0, 1) # Yellow color
text_color: (0, 0, 0, 1) # Black text color
font_size: '20sp'
opacity: 0
disabled: True
on_press: root.set_region()
MDRoundFlatButton:
id: btn3
text: 'Detect'
size_hint: (1, 0.1)
md_bg_color: (1, 1, 0, 1) # Yellow color
text_color: (0, 0, 0, 1) # Black text color
font_size: '20sp'
opacity: 0
disabled: True
on_press: root.detect()
MDRoundFlatButton:
id: btn4
text: 'Reset'
size_hint: (1, 0.1)
md_bg_color: (1, 1, 0, 1) # Yellow color
text_color: (0, 0, 0, 1) # Black text color
font_size: '20sp'
opacity: 0
disabled: True
on_press: root.reset_process()