summaryrefslogtreecommitdiff
path: root/data/themes/playbacks.edc
blob: 5f34a472ccc622027bfd59a309f8bcfdb0782fb4 (plain) (blame)
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
191
192
193
194
195
196
197
198
199
200
201
202
#define ADD_SPACER(_name, _min_x, _min_y, _max_x, _max_y, _align_x,        \
                   _align_y, _rel1_to_x, _rel1_to_y, _rel1_x, _rel1_y,     \
                   _rel2_to_x, _rel2_to_y, _rel2_x, _rel2_y)               \
   part {                                                                  \
      name: _name;                                                         \
      type: SPACER;                                                        \
      scale: 1;                                                            \
      description {                                                        \
         state: "default" 0.0;                                             \
         min: _min_x _min_y;                                               \
         max: _max_x _max_y;                                               \
         fixed: 1 1;                                                       \
         align: _align_x _align_y;                                         \
         rel1 {                                                            \
            to_x: _rel1_to_x;                                              \
            to_y: _rel1_to_y;                                              \
            relative: _rel1_x _rel1_y;                                     \
         }                                                                 \
         rel2 {                                                            \
            to_x: _rel2_to_x;                                              \
            to_y: _rel2_to_y;                                              \
            relative: _rel2_x _rel2_y;                                     \
         }                                                                 \
      }                                                                    \
   }

group {
    name: "elm/layout/playbacks/default";
    alias: "elm/layout/sinks/default";
    alias: "elm/layout/sources/default";

    parts {
        part {
            name: "bg";
            type: RECT;
            mouse_events: 1;
            description {
                state: "default";
                color: 0 0 0 0;
            }
        }

        part {
            name: "list";
            type: SWALLOW;
            description {
                state: "default";
            }
        }
    }
}

group {
   name: "elm/genlist/item/playbacks/default";
   alias: "elm/genlist/item/sinks/default";
   alias: "elm/genlist/item/sources/default";

   data {
      item: "texts" "name";
      item: "contents" "slider mute icon hover";
   }

   color_classes {
      color_class {
         name: "playback_name";
         color: 0 0 0 255;
      }
   }

   parts {
      part {
         name: "base";
         type: RECT;
         mouse_events: 1;
         scale: 1;
         description {
            state: "default";
            min: 0 120;
            max: -1 -1;
            color: 64 64 64 255;
         }
         description {
            state: "odd";
            min: 0 120;
            max: -1 -1;
            color: 56 56 56 255;
         }
      }
      part {
         name: "mute";
         type: SWALLOW;
         scale: 1;
         description {
            state: "default";
            align: 1.0 0.0;
            fixed: 1 1;
            rel1.relative: 1.0 0.0;
            rel2.relative: 1.0 0.0;
         }
      }

      part {
         name: "hover";
         type: SWALLOW;
         scale: 1;
         description {
            state: "default";
            align: 1.0 0.0;
            fixed: 1 1;
            rel1 {
               relative: 0.0 0.0;
               to: "mute";
            }
            rel2 {
               relative: 0.0 0.0;
               to: "mute";
            }
         }
      }

      part {
         name: "icon";
         type: SWALLOW;
         scale: 1;
         description {
            state: "default";
            align: 0.0 0.0;
            fixed: 1 1;
            min: 40 40;
            max: 40 40;
            rel1.relative: 0.0 0.0;
            rel2.relative: 0.0 0.0;
         }
      }

      ADD_SPACER("spacer.icon", 20, 20, 20, 20, 0.0, 0.5, "icon", "icon",
                 1.0, 0.0, "icon", "icon", 1.0, 1.0)

      part {
         name: "name";
         type: TEXT;
         mouse_events: 0;
         scale: 1;
         description {
            state: "default";
            align: 0.0 0.5;
            fixed: 1 1;
            rel1 {
               to: "spacer.icon";
               relative: 1.0 0.0;
            }
            rel2 {
               to_x: "hover";
               to_y: "spacer.icon";
               relative: 0.0 1.0;
            }
            color_class: "playback_name";
            text {
               size: 10;
               align: 0.0 0.5;
               min: 1 1;
               ellipsis: -1;
            }
         }
      }

      ADD_SPACER("spacer.mute", 0, 20, 0, 20, 0.0, 0.0, "base", "mute",
                 0.0, 1.0, "base", "mute", 0.0, 1.0)

      part {
         name: "slider";
         type: SWALLOW;
         scale: 1;
         description {
            state: "default";
            fixed: 1 1;
            align: 0.5 0.0;
            rel1 {
               to_y: "spacer.mute";
               relative: 0.0 1.0;
            }
            rel2 {
               to: "base";
               relative: 1.0 1.0;
            }
         }
      }
   }

   programs {
      program {
         signal: "elm,state,odd"; source: "elm";
         action: STATE_SET "odd" 1.0;
         target: "base";
      }
      program {
         signal: "elm,state,even"; source: "elm";
         action: STATE_SET "default" 0.0;
         target: "base";
      }
   }
}