set disable action menu item when there is no changed item
[profile/tv/apps/native/air_home.git] / edje / view / actionmenu.edc
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include "../../include/defs.h"
18 group {
19         name, GRP_ACTION_MENU;
20         parts {
21                 part {
22                         name, "bg";
23                         type, RECT;
24                         scale, 1;
25                         description {
26                                 state, "default" 0.0;
27                                 color, 0 0 0 150;
28                         }
29                 }
30                 part {
31                         name, "bar";
32                         type, RECT;
33                         scale, 1;
34                         description {
35                                 state, "default" 0.0;
36                                 rel1.relative, 1.0 0.0;
37                                 min, 500 0;
38                                 fixed, 1 0;
39                                 align, 1.0 0.5;
40                         }
41                 }
42                 part {
43                         name, "divider.left";
44                         type, RECT;
45                         scale, 1;
46                         description {
47                                 state, "default" 0.0;
48                                 rel1.to, "bar";
49                                 rel2 {
50                                         to, "bar";
51                                         relative, 0.0 1.0;
52                                 }
53                                 min, 1 0;
54                                 align, 1.0 0.5;
55                                 fixed, 1 0;
56                                 color, 224 224 224 255;
57                         }
58                 }
59                 part {
60                         name, "livetv";
61                         type, RECT;
62                         scale, 1;
63                         description {
64                                 state, "default" 0.0;
65                                 rel1.to, "bar";
66                                 rel2 {
67                                         to, "bar";
68                                         relative, 1.0 0.0;
69                                 }
70                                 min, 0 118;
71                                 align, 0.5 0.0;
72                                 fixed, 0 1;
73                         }
74                 }
75                 part {
76                         name, PART_ACTION_MENU_LIVETV;
77                         type, SWALLOW;
78                         scale, 1;
79                         description {
80                                 state, "default" 0.0;
81                                 rel1 {
82                                         to, "livetv";
83                                         relative, 0.5 0.5;
84                                 }
85                                 rel2 {
86                                         to, "livetv";
87                                         relative, 0.5 0.5;
88                                 }
89                                 min, 372 64;
90                                 fixed, 1 1;
91                         }
92                 }
93                 part {
94                         name, "divider.up";
95                         type, RECT;
96                         scale, 1;
97                         description {
98                                 state, "default" 0.0;
99                                 rel1 {
100                                         to, "livetv";
101                                         relative, 0.0 1.0;
102                                 }
103                                 rel2.to, "livetv";
104                                 color, 224 224 224 255;
105                                 min, 0 1;
106                                 align, 0.5 0.0;
107                                 fixed, 0 1;
108                         }
109                 }
110                 part {
111                         name, "table.bg";
112                         type, RECT;
113                         scale, 1;
114                         description {
115                                 state, "default" 0.0;
116                                 rel1 {
117                                         to, "divider.up";
118                                         relative, 0.0 1.0;
119                                 }
120                                 rel2.to, "divider.up";
121                                 min, 0 124;
122                                 align, 0.5 0.0;
123                                 fixed, 0 1;
124                                 color, 224 224 224 255;
125                         }
126                 }
127                 part {
128                         name, PART_ACTION_MENU_TABLE;
129                         type, SWALLOW;
130                         scale, 1;
131                         description {
132                                 state, "default" 0.0;
133                                 rel1.to, "table.bg";
134                                 rel2.to, "table.bg";
135                                 fixed, 1 1;
136                         }
137                 }
138                 part {
139                         name, "divider.down";
140                         type, RECT;
141                         scale, 1;
142                         description {
143                                 state, "default" 0.0;
144                                 rel1 {
145                                         to, PART_ACTION_MENU_TABLE;
146                                         relative, 0.0 1.0;
147                                 }
148                                 rel2.to, PART_ACTION_MENU_TABLE;
149                                 color, 224 224 224 255;
150                                 min, 0 1;
151                                 align, 0.5 0.0;
152                                 fixed, 0 1;
153                         }
154                 }
155         }
156 }
157 group {
158         name, GRP_ACTION_MENU_LIVETV;
159         parts {
160                 part {
161                         name, "bg";
162                         type, RECT;
163                         scale, 1;
164                         description {
165                                 state, "default" 0.0;
166                                 min, 372 64;
167                                 color, 194 194 194 255;
168                         }
169                         description {
170                                 state, "focus" 0.0;
171                                 inherit, "default" 0.0;
172                                 color, 0 119 246 255;
173                         }
174                 }
175                 part {
176                         name, "area";
177                         type, RECT;
178                         scale, 1;
179                         description {
180                                 state, "default" 0.0;
181                                 min, 370 62;
182                                 rel1.relative, 0.5 0.5;
183                                 rel2.relative, 0.5 0.5;
184                                 fixed, 1 1;
185                                 color, 255 255 255 255;
186                         }
187                         description {
188                                 state, "focus" 0.0;
189                                 inherit, "default" 0.0;
190                                 color, 0 119 246 255;
191                         }
192                 }
193                 part {
194                         name, "text";
195                         type, TEXT;
196                         scale, 1;
197                         description {
198                                 state, "default" 0.0;
199                                 text {
200                                         font, "TizenSans";
201                                         size, 28;
202                                         text, "Live TV";
203                                 }
204                                 color, 87 87 87 255;
205                                 fixed, 1 1;
206                         }
207                         description {
208                                 state, "focus" 0.0;
209                                 inherit, "default" 0.0;
210                                 color, 255 255 255 255;
211                         }
212                 }
213         }
214         programs {
215                 program {
216                         name, "sig,focus";
217                         signal, SIG_FOCUS;
218                         source, SRC_PROG;
219                         action, STATE_SET "focus" 0.0;
220                         target, "text";
221                         target, "area";
222                         target, "bg";
223                 }
224                 program {
225                         name, "sig,unfocus";
226                         signal, SIG_UNFOCUS;
227                         source, SRC_PROG;
228                         action, STATE_SET "default" 0.0;
229                         target, "text";
230                         target, "area";
231                         target, "bg";
232                 }
233         }
234 }
235 group {
236         name, GRP_ACTION_MENU_TABLE_ITEM;
237         parts {
238                 part {
239                         name, "bg";
240                         type, RECT;
241                         scale, 1;
242                         description {
243                                 state, "default" 0.0;
244                                 min, 124 124;
245                         }
246                 }
247                 part {
248                         name, "pad.icon";
249                         type, RECT;
250                         scale, 1;
251                         description {
252                                 state, "default" 0.0;
253                                 min, 0 14;
254                                 rel1.relative, 0.5 0.0;
255                                 rel2.relative, 0.5 0.0;
256                                 fixed, 1 1;
257                                 align, 0.0 0.0;
258                         }
259                 }
260                 part {
261                         name, "clip";
262                         type, RECT;
263                         scale, 1;
264                         description {
265                                 state, "default" 0.0;
266                                 color, 0 0 0 0;
267                         }
268                         description {
269                                 state, "focus" 0.0;
270                                 inherit, "default" 0.0;
271                                 color, 255 255 255 255;
272                         }
273                 }
274                 part {
275                         name, PART_ACTION_MENU_TABLE_ITEM_BG;
276                         type, SWALLOW;
277                         scale, 1;
278                         clip_to, "clip";
279                         description {
280                                 state, "default" 0.0;
281                                 fixed, 1 1;
282                         }
283                 }
284                 part {
285                         name, PART_ACTION_MENU_TABLE_ITEM_ICON;
286                         type, SWALLOW;
287                         scale, 1;
288                         description {
289                                 state, "default" 0.0;
290                                 rel1 {
291                                         to, "pad.icon";
292                                         relative, 1.0 1.0;
293                                 }
294                                 rel2 {
295                                         to, "pad.icon";
296                                         relative, 1.0 1.0;
297                                 }
298                                 min, 60 60;
299                                 align, 0.5 0.0;
300                                 fixed, 1 1;
301                         }
302                 }
303                 part {
304                         name, PART_ACTION_MENU_TABLE_ITEM_ICON_FOCUS;
305                         type, SWALLOW;
306                         scale, 1;
307                         clip_to, "clip";
308                         description {
309                                 state, "default" 0.0;
310                                 rel1.to, PART_ACTION_MENU_TABLE_ITEM_ICON;
311                                 rel2.to, PART_ACTION_MENU_TABLE_ITEM_ICON;
312                                 fixed, 1 1;
313                         }
314                 }
315                 part {
316                         name, "pad.text";
317                         type, RECT;
318                         scale, 1;
319                         description {
320                                 state, "default" 0.0;
321                                 rel1 {
322                                         to, PART_ACTION_MENU_TABLE_ITEM_ICON;
323                                         relative, 0.5 1.0;
324                                 }
325                                 rel2 {
326                                         to, PART_ACTION_MENU_TABLE_ITEM_ICON;
327                                         relative, 0.5 1.0;
328                                 }
329                                 min, 0 6;
330                                 fixed, 1 1;
331                                 align, 0.5 0.0;
332                         }
333                 }
334                 part {
335                         name, PART_ACTION_MENU_TABLE_ITEM_TEXT;
336                         type, SWALLOW;
337                         scale, 1;
338                         description {
339                                 state, "default" 0.0;
340                                 rel1 {
341                                         to, "pad.text";
342                                         relative, 1.0 1.0;
343                                 }
344                                 rel2 {
345                                         to, "pad.text";
346                                         relative, 1.0 1.0;
347                                 }
348                                 min, 80 20;
349                                 align, 0.5 0.0;
350                                 fixed, 1 1;
351                         }
352                 }
353                 part {
354                         name, PART_ACTION_MENU_TABLE_ITEM_TEXT_FOCUS;
355                         type, SWALLOW;
356                         scale, 1;
357                         clip_to, "clip";
358                         description {
359                                 state, "default" 0.0;
360                                 rel1.to, PART_ACTION_MENU_TABLE_ITEM_TEXT;
361                                 rel2.to, PART_ACTION_MENU_TABLE_ITEM_TEXT;
362                                 fixed, 1 1;
363                         }
364                 }
365         }
366         programs {
367                 program {
368                         name, "sig,focus";
369                         signal, SIG_FOCUS;
370                         source, SRC_PROG;
371                         action, STATE_SET "focus" 0.0;
372                         transition, TRANSITION_DECEL;
373                         target, "clip";
374                 }
375                 program {
376                         name, "sig,unfocus";
377                         signal, SIG_UNFOCUS;
378                         source, SRC_PROG;
379                         action, STATE_SET "default" 0.0;
380                         transition, TRANSITION_DECEL;
381                         target, "clip";
382                 }
383         }
384 }