-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmrbeats.kv
111 lines (98 loc) · 3.91 KB
/
mrbeats.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
#: import track track
#: import play_indicator play_indicator
MainWidget:
<VerticalSpacingWidget>:
size_hint_y: 0.01
<ControlButton@Button>:
<MainWidget>:
tracks_layout: tracks
play_indicator_widget: play_indicator_widget
BoxLayout:
orientation: "vertical"
# top layout work
RelativeLayout:
size_hint_y: None
height: dp(60)
Image:
source: "images/top_background.png"
allow_stretch: True
keep_ratio: False
Image:
size_hint_x: None
width: dp(230)
source: "images/logo.png"
allow_stretch: True
BoxLayout:
pos_hint: {"center_x": .5}
size_hint_x: None
width: dp(160)
ControlButton:
background_normal: "images/play_button_normal.png"
background_down: "images/play_button_down.png"
on_press: root.on_play_button_pressed()
ControlButton:
background_normal: "images/stop_button_normal.png"
background_down: "images/stop_button_down.png"
on_press: root.on_stop_button_pressed()
BoxLayout:
size_hint_x: None
width: dp(180)
pos_hint: {"right": 1}
ControlButton:
size_hint_x: None
width: dp(45)
on_press: root.bpm -= 5
background_normal: "images/minus_button_normal.png"
background_normal: "images/minus_button_down.png"
RelativeLayout:
Image:
source: "images/bpm_lcd_background.png"
allow_stretch: True
keep_ratio: False
Label:
pos: -dp(4), dp(2)
text: "888"
font_name: "fonts/Lcd.ttf"
font_size: dp(36)
opacity: .1
color: 0, 1, 1, 1
Label:
# Search: python numbers formating examples
text: '{:0>3}'.format(str(root.bpm))
pos: -dp(4), dp(2)
font_name: "fonts/Lcd.ttf"
font_size: dp(36)
color: 0, 1, 1, 1
ControlButton:
size_hint_x: None
width: dp(45)
on_press: root.bpm += 5
background_normal: "images/plus_button_normal.png"
background_normal: "images/plus_button_down.png"
Widget:
size_hint_x: None
width: dp(20)
# Bottom layout
RelativeLayout:
Image:
source: "images/background.jpg"
allow_stretch: True # tu peux changer ta taille, s'élargir
keep_ratio: False # tu peux te déformer, ne pas conserver son h et l
BoxLayout:
orientation: "vertical"
x: dp(16)
y: dp(16)
size_hint: None, None
size: (self.parent.width - dp(32), self.parent.height - dp(32))
PlayIndicatorWidget:
id: play_indicator_widget
size_hint_y: None
height: dp(10)
left_align: root.TRACK_STEP_LEFT_ALIGN
ScrollView:
do_scroll_x: False
do_scroll_y: True
BoxLayout:
size_hint_min_y: dp(75) * root.nb_tracks
orientation: "vertical"
id: tracks