Fixed font issues by replacing acknowledge2 completely.
[multipass-eu.git] / src / player-display-track.rb
1 c = EDJE.collection("euphoria")
2 parent = c.part("player.normal.group.display")
3
4 TEXT_COLOR = "#95e3fd"
5 OUTLINE_COLOR = "#01366bc1"
6
7 c.part("player.time", :text) do |p|
8         p.effect = :outline
9         p.use_alternate_font_metrics = true
10
11         p.description do |d|
12                 d.rel[0].to = d.rel[1].to = parent
13                 d.rel[0].set_offset(15, 6)
14                 d.rel[1].set_rel(0.0, 0.0)
15                 d.rel[1].set_offset(75, 21)
16
17                 d.color = TEXT_COLOR
18                 d.outline_color = OUTLINE_COLOR
19
20                 d.text = "00:06:35"
21                 d.font = "multipass_digits.ttf"
22                 d.font_size = 12
23                 d.set_text_align(1.0, 0.5)
24         end
25 end
26
27 c.part("player.songname", :text) do |p|
28         p.effect = :outline
29
30         p.description do |d|
31                 d.color = TEXT_COLOR
32                 d.outline_color = OUTLINE_COLOR
33
34                 d.set_align(0.0)
35
36                 d.text = "Metallica - Battery"
37                 d.font = "slkscrb.ttf"
38                 d.font_size = 8
39                 d.set_text_min(true, true)
40                 d.set_text_align(0.0)
41         end
42 end
43
44 c.part("player.songname.clip", :rect) do |p|
45         p.description do |d|
46                 d.rel[0].to = d.rel[1].to = parent
47                 d.rel[0].set_offset(13, 67)
48                 d.rel[1].set_rel(0.0, 0.0)
49                 d.rel[1].set_offset(154, 79)
50         end
51
52         c.part("player.songname").clip = p
53         c.part("player.songname").description do |d|
54                 d.rel[0].to = d.rel[1].to = p
55         end
56 end
57
58 c.program("player.time.toggle_display", :emit_signal) do |p|
59         p.signal = "mouse,down,1,double"
60         p.source = "player.time"
61         p.emission_signal = "TOGGLE_TIME_DISPLAY_MODE"
62 end