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
|
local lvgl = require("lvgl")
local widgets = require("widgets")
local backstack = require("backstack")
local font = require("font")
return function(opts)
local screen = {}
screen.root = lvgl.Object(nil, {
flex = {
flex_direction = "column",
flex_wrap = "wrap",
justify_content = "center",
align_items = "center",
align_content = "center",
},
w = lvgl.HOR_RES(),
h = lvgl.VER_RES(),
})
screen.root:center()
screen.status_bar = widgets.StatusBar(screen.root, {
back_cb = backstack.pop,
transparent_bg = true,
})
local track_info = screen.root:Object {
flex = {
flex_direction = "column",
justify_content = "center",
align_items = "center",
align_content = "center",
},
w = lvgl.SIZE_CONTENT,
flex_grow = 1,
}
local artist = track_info:Label {
text = "Cool Artist",
text_font = font.fusion_10,
}
local artist = track_info:Label {
text = "Good Album",
text_font = font.fusion_10,
}
local title = track_info:Label {
text = "A really good song",
}
local scrubber = screen.root:Object {}
local times = screen.root:Object {
flex = {
flex_direction = "row",
justify_content = "center",
align_items = "space-between",
align_content = "center",
},
w = lvgl.PCT(100),
h = lvgl.SIZE_CONTENT,
}
local cur_time = track_info:Label {
text = "1:09",
}
local end_time = track_info:Label {
text = "4:20",
}
local controls = screen.root:Object {
flex = {
flex_direction = "row",
justify_content = "center",
align_items = "space-evenly",
align_content = "center",
},
w = lvgl.PCT(100),
h = lvgl.SIZE_CONTENT,
}
controls:Label {
text = ">",
}
controls:Label {
text = ">",
}
controls:Label {
text = ">",
}
controls:Label {
text = ">",
}
return screen
end
|