remove edje_cc warning
[profile/tv/apps/native/homescreen.git] / edje / widget / label.edc
1 /*
2  * Copyright (c) 2014 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 styles {
18         style {
19                 name, "text_style_24_unfocused_left";
20                 base, "font=TizenSans:style=Bold font_size=24 color=#ffffff align=left";
21         }
22         style {
23                 name, "text_style_24_focused_left";
24                 base, "font=TizenSans:style=Bold font_size=24 color=#ffffff align=left";
25         }
26         style {
27                 name, "text_style_24_unfocused_center";
28                 base, "font=TizenSans:style=Bold font_size=22 color=#ffffff align=center";
29         }
30         style {
31                 name, "text_style_24_focused_center";
32                 base, "font=TizenSans:style=Bold font_size=22 color=#ffffff align=center";
33         }
34         style {
35                 name, "text_style_24_dim_center";
36                 base, "font=TizenSans:style=Bold font_size=22 color=#bdbdbd align=center";
37         }
38         style {
39                 name, "text_style_32_unfocused_left";
40                 base, "font=TizenSans font_size=32 color=#ffffff align=left";
41         }
42         style {
43                 name, "text_style_32_focused_left";
44                 base, "font=TizenSans font_size=32 color=#ffffff align=left";
45         }
46         style {
47                 name, "text_style_40_unfocused_center";
48                 base, "font=TizenSans font_size=40 color=#ffffff align=center";
49         }
50         style {
51                 name, "text_style_40_focused_center";
52                 base, "font=TizenSans font_size=40  color=#ffffff align=center";
53         }
54         style {
55                 name, "text_style_20_unfocused_left";
56                 base, "font=TizenSans font_size=20 color=#ffffff align=left";
57         }
58         style {
59                 name, "text_style_20_focused_left";
60                 base, "font=TizenSans font_size=20  color=#ffffff align=left";
61         }
62         style {
63                 name, "text_style_22_center";
64                 base, "font=TizenSans:style=Bold font_size=22  color=#79889b align=center";
65         }
66         style {
67                 name, "text_style_28_left";
68                 base, "font=TizenSans font_size= 28 color=#45476C align=center";
69         }
70 }
71
72 group {
73         name, "elm/label/base/slide_style_24_left";
74         script {
75                 public g_duration = 0, g_stopslide, g_timer_id, g_anim_id;
76                 public message(Msg_Type:type, id, ...) {
77                         if (type == MSG_FLOAT_SET) {
78                                 new Float:duration;
79                                 duration = getfarg(2);
80                                 set_float(g_duration, duration);
81                         }
82                 }
83                 public slide_to_end_anim(val, Float:pos) {
84                         new stopflag;
85                         new id;
86                         stopflag = get_int(g_stopslide);
87                         if (stopflag == 1)
88                                 return;
89                         set_tween_state(PART:"elm.text", pos, "slide_begin", 0.0, "slide_end", 0.0);
90                         if (pos >= 1.0) {
91                                 id = timer(0.5, "slide_to_begin", 1);
92                                 set_int(g_timer_id, id);
93                         }
94                 }
95                 public slide_to_end() {
96                         new stopflag;
97                         new id;
98                         new Float:duration;
99                         stopflag = get_int(g_stopslide);
100                         if (stopflag == 1)
101                                 return;
102                         duration = get_float(g_duration);
103                         id = anim(duration, "slide_to_end_anim", 1);
104                         set_int(g_anim_id, id);
105                 }
106                 public slide_to_begin() {
107                         new stopflag;
108                         new id;
109                         stopflag = get_int(g_stopslide);
110                         if (stopflag == 1) return;
111                         set_state(PART:"elm.text", "slide_begin", 0.0);
112                         id = timer(0.5, "slide_to_end", 1);
113                         set_int(g_timer_id, id);
114                 }
115                 public start_slide() {
116                         set_int(g_stopslide, 0);
117                         set_state(PART:"elm.text", "slide_begin", 0.0);
118                         slide_to_end();
119                 }
120                 public stop_slide() {
121                         new id;
122                         set_int(g_stopslide, 1);
123                         id = get_int(g_anim_id);
124                         cancel_anim(id);
125                         id = get_int(g_timer_id);
126                         cancel_timer(id);
127                         set_state(PART:"elm.text", "default", 0.0);
128                 }
129         }
130         parts {
131                 part {
132                         name, "label.text.clip";
133                         type, RECT;
134                         description {
135                                 state, "default" 0.0;
136                         }
137                 }
138                 part {
139                         name, "elm.text";
140                         type, TEXTBLOCK;
141                         scale, 1;
142                         clip_to, "label.text.clip";
143                         description {
144                                 state, "default" 0.0;
145                                 rel1.relative, 0.0 0.0;
146                                 rel2.relative, 1.0 1.0;
147                                 align, 0.0 0.5;
148                                 text {
149                                         style, "text_style_24_unfocused_left";
150                                         align, 0.0 0.0;
151                                         min, 0 1;
152                                 }
153                         }
154                         description {
155                                 state, "slide_end" 0.0;
156                                 inherit, "default" 0.0;
157                                 rel1.relative, 1.0 0.0;
158                                 rel2.relative, 1.0 1.0;
159                                 align, 1.0 0.5;
160                                 text {
161                                         style, "text_style_24_focused_left";
162                                         align, 0.0 0.0;
163                                         min, 1 1;
164                                         ellipsis, -1.0;
165                                 }
166                         }
167                         description {
168                                 state, "slide_begin" 0.0;
169                                 inherit, "default" 0.0;
170                                 rel1.relative, 0.0 0.0;
171                                 rel2.relative, 0.0 1.0;
172                                 align, 0.0 0.5;
173                                 text {
174                                         style, "text_style_24_focused_left";
175                                         align, 0.0 0.0;
176                                         min, 1 1;
177                                         ellipsis, -1.0;
178                                 }
179                         }
180                 }
181         }
182         programs {
183                 program {
184                         name, "start_slide";
185                         signal, "elm,state,slide,start";
186                         source, "elm";
187                         script {
188                                 start_slide();
189                         }
190                 }
191                 program {
192                         name, "stop_slide";
193                         signal, "elm,state,slide,stop";
194                         source, "elm";
195                         script {
196                                 stop_slide();
197                         }
198                 }
199         }
200 }
201
202 group {
203         name, "elm/label/base/slide_style_20_left";
204         inherit, "elm/label/base/slide_style_24_left";
205         parts {
206                 part {
207                         name, "elm.text";
208                         type, TEXTBLOCK;
209                         scale, 1;
210                         clip_to, "label.text.clip";
211                         description {
212                                 state, "default" 0.0;
213                                 rel1.relative, 0.0 0.0;
214                                 rel2.relative, 1.0 1.0;
215                                 align, 0.0 0.5;
216                                 text {
217                                         style, "text_style_20_unfocused_left";
218                                         align, 0.0 1.0;
219                                         min, 0 1;
220                                 }
221                         }
222                         description {
223                                 state, "slide_end" 0.0;
224                                 inherit, "default" 0.0;
225                                 rel1.relative, 1.0 0.0;
226                                 rel2.relative, 1.0 1.0;
227                                 align, 1.0 0.5;
228                                 text {
229                                         style, "text_style_20_focused_left";
230                                         align, 0.0 1.0;
231                                         min, 1 1;
232                                         ellipsis, -1.0;
233                                 }
234                         }
235                         description {
236                                 state, "slide_begin" 0.0;
237                                 inherit, "default" 0.0;
238                                 rel1.relative, 0.0 0.0;
239                                 rel2.relative, 0.0 1.0;
240                                 align, 0.0 0.5;
241                                 text {
242                                         style, "text_style_20_focused_left";
243                                         align, 0.0 1.0;
244                                         min, 1 1;
245                                         ellipsis, -1.0;
246                                 }
247                         }
248                         description {
249                                 state, "dim" 0.0;
250                                 inherit, "default" 0.0;
251                                 text.style, "text_style_20_unfocused_left";
252                                 color, 255 255 255 20;
253                         }
254                 }
255                 programs {
256                         program {
257                                 name, "dim,label";
258                                 signal, SIG_DIM_ITEM;
259                                 source, SRC_PROG;
260                                 action, STATE_SET "dim" 0.0;
261                                 transition, LINEAR 0.2;
262                                 target, "elm.text";
263                         }
264                         program {
265                                 name, "undim,label";
266                                 signal, SIG_UNDIM_ITEM;
267                                 source, SRC_PROG;
268                                 action, STATE_SET "default" 0.0;
269                                 transition, LINEAR 0.2;
270                                 target, "elm.text";
271                         }
272                 }
273         }
274 }
275
276 group {
277         name, "elm/label/base/slide_style_40_center";
278         inherit, "elm/label/base/slide_style_24_left";
279         parts {
280                 part {
281                         name, "elm.text";
282                         type, TEXTBLOCK;
283                         scale, 1;
284                         clip_to, "label.text.clip";
285                         description {
286                                 state, "default" 0.0;
287                                 rel1.relative, 0.0 0.0;
288                                 rel2.relative, 1.0 1.0;
289                                 align, 0.0 0.5;
290                                 text {
291                                         style, "text_style_40_unfocused_center";
292                                         align, 0.0 1.0;
293                                         min, 0 1;
294                                 }
295                         }
296                         description {
297                                 state, "slide_end" 0.0;
298                                 inherit, "default" 0.0;
299                                 rel1.relative, 1.0 0.0;
300                                 rel2.relative, 1.0 1.0;
301                                 align, 1.0 0.5;
302                                 text {
303                                         style, "text_style_40_focused_center";
304                                         align, 0.0 1.0;
305                                         min, 1 1;
306                                         ellipsis, -1.0;
307                                 }
308                         }
309                         description {
310                                 state, "slide_begin" 0.0;
311                                 inherit, "default" 0.0;
312                                 rel1.relative, 0.0 0.0;
313                                 rel2.relative, 0.0 1.0;
314                                 align, 0.0 0.5;
315                                 text {
316                                         style, "text_style_40_focused_center";
317                                         align, 0.0 1.0;
318                                         min, 1 1;
319                                         ellipsis, -1.0;
320                                 }
321                         }
322                         description {
323                                 state, "dim" 0.0;
324                                 inherit, "default" 0.0;
325                                 text.style, "text_style_40_unfocused_center";
326                                 color, 255 255 255 20;
327                         }
328                 }
329                 programs {
330                         program {
331                                 name, "dim,label";
332                                 signal, SIG_DIM_ITEM;
333                                 source, SRC_PROG;
334                                 action, STATE_SET "dim" 0.0;
335                                 transition, LINEAR 0.2;
336                                 target, "elm.text";
337                         }
338                         program {
339                                 name, "undim,label";
340                                 signal, SIG_UNDIM_ITEM;
341                                 source, SRC_PROG;
342                                 action, STATE_SET "default" 0.0;
343                                 transition, LINEAR 0.2;
344                                 target, "elm.text";
345                         }
346                 }
347         }
348 }
349
350 group {
351         name, "elm/label/base/slide_style_32_left";
352         inherit, "elm/label/base/slide_style_24_left";
353         parts {
354                 part {
355                         name, "elm.text";
356                         type, TEXTBLOCK;
357                         scale, 1;
358                         clip_to, "label.text.clip";
359                         description {
360                                 state, "default" 0.0;
361                                 rel1.relative, 0.0 0.0;
362                                 rel2.relative, 1.0 1.0;
363                                 align, 0.0 0.5;
364                                 text {
365                                         style, "text_style_32_unfocused_left";
366                                         align, 0.0 1.0;
367                                         min, 0 1;
368                                 }
369                         }
370                         description {
371                                 state, "slide_end" 0.0;
372                                 inherit, "default" 0.0;
373                                 rel1.relative, 1.0 0.0;
374                                 rel2.relative, 1.0 1.0;
375                                 align, 1.0 0.5;
376                                 text {
377                                         style, "text_style_32_focused_left";
378                                         align, 0.0 1.0;
379                                         min, 1 1;
380                                         ellipsis, -1.0;
381                                 }
382                         }
383                         description {
384                                 state, "slide_begin" 0.0;
385                                 inherit, "default" 0.0;
386                                 rel1.relative, 0.0 0.0;
387                                 rel2.relative, 0.0 1.0;
388                                 align, 0.0 0.5;
389                                 text {
390                                         style, "text_style_32_focused_left";
391                                         align, 0.0 1.0;
392                                         min, 1 1;
393                                         ellipsis, -1.0;
394                                 }
395                         }
396                         description {
397                                 state, "dim" 0.0;
398                                 inherit, "default" 0.0;
399                                 text.style, "text_style_32_unfocused_left";
400                                 color, 255 255 255 20;
401                         }
402                 }
403                 programs {
404                         program {
405                                 name, "dim,label";
406                                 signal, SIG_DIM_ITEM;
407                                 source, SRC_PROG;
408                                 action, STATE_SET "dim" 0.0;
409                                 transition, LINEAR 0.2;
410                                 target, "elm.text";
411                         }
412                         program {
413                                 name, "undim,label";
414                                 signal, SIG_UNDIM_ITEM;
415                                 source, SRC_PROG;
416                                 action, STATE_SET "default" 0.0;
417                                 transition, LINEAR 0.2;
418                                 target, "elm.text";
419                         }
420                 }
421         }
422 }
423
424 group {
425         name, "elm/label/base/slide_style_24_center";
426         inherit, "elm/label/base/slide_style_24_left";
427         parts {
428                 part {
429                         name, "elm.text";
430                         type, TEXTBLOCK;
431                         scale, 1;
432                         clip_to, "label.text.clip";
433                         description {
434                                 state, "default" 0.0;
435                                 rel1.relative, 0.0 0.0;
436                                 rel2.relative, 1.0 1.0;
437                                 align, 0.0 0.5;
438                                 text {
439                                         style, "text_style_24_unfocused_center";
440                                         align, 0.0 1.0;
441                                         min, 0 1;
442                                 }
443                         }
444                         description {
445                                 state, "slide_end" 0.0;
446                                 inherit, "default" 0.0;
447                                 rel1.relative, 1.0 0.0;
448                                 rel2.relative, 1.0 1.0;
449                                 align, 1.0 0.5;
450                                 text {
451                                         style, "text_style_24_focused_center";
452                                         align, 0.0 1.0;
453                                         min, 1 1;
454                                         ellipsis, -1.0;
455                                 }
456                         }
457                         description {
458                                 state, "slide_begin" 0.0;
459                                 inherit, "default" 0.0;
460                                 rel1.relative, 0.0 0.0;
461                                 rel2.relative, 0.0 1.0;
462                                 align, 0.0 0.5;
463                                 text {
464                                         style, "text_style_24_focused_center";
465                                         align, 0.0 1.0;
466                                         min, 1 1;
467                                         ellipsis, -1.0;
468                                 }
469                         }
470                         description {
471                                 state, "dim" 0.0;
472                                 inherit, "default" 0.0;
473                                 text.style, "text_style_24_dim_center";
474                                 color, 255 255 255 20;
475                         }
476                 }
477                 programs {
478                         program {
479                                 name, "dim,label";
480                                 signal, SIG_DIM_ITEM;
481                                 source, SRC_PROG;
482                                 action, STATE_SET "dim" 0.0;
483                                 transition, LINEAR 0.2;
484                                 target, "elm.text";
485                         }
486                         program {
487                                 name, "undim,label";
488                                 signal, SIG_UNDIM_ITEM;
489                                 source, SRC_PROG;
490                                 action, STATE_SET "default" 0.0;
491                                 transition, LINEAR 0.2;
492                                 target, "elm.text";
493                         }
494                 }
495         }
496 }
497
498 group {
499         name, "elm/label/base/slide_style_22_center";
500         inherit, "elm/label/base/slide_style_24_left";
501         parts {
502                 part {
503                         name, "elm.text";
504                         type, TEXTBLOCK;
505                         scale, 1;
506                         clip_to, "label.text.clip";
507                         description {
508                                 state, "default" 0.0;
509                                 rel1.relative, 0.0 0.0;
510                                 rel2.relative, 1.0 1.0;
511                                 align, 0.0 0.5;
512                                 text {
513                                         style, "text_style_22_center";
514                                         align, 0.0 1.0;
515                                         min, 0 1;
516                                 }
517                         }
518                         description {
519                                 state, "slide_end" 0.0;
520                                 inherit, "default" 0.0;
521                                 rel1.relative, 1.0 0.0;
522                                 rel2.relative, 1.0 1.0;
523                                 align, 1.0 0.5;
524                                 text {
525                                         style, "text_style_22_center";
526                                         align, 0.0 1.0;
527                                         min, 1 1;
528                                         ellipsis, -1.0;
529                                 }
530                         }
531                         description {
532                                 state, "slide_begin" 0.0;
533                                 inherit, "default" 0.0;
534                                 rel1.relative, 0.0 0.0;
535                                 rel2.relative, 0.0 1.0;
536                                 align, 0.0 0.5;
537                                 text {
538                                         style, "text_style_22_center";
539                                         align, 0.0 1.0;
540                                         min, 1 1;
541                                         ellipsis, -1.0;
542                                 }
543                         }
544                 }
545         }
546 }
547
548 group {
549         name, "elm/label/base/slide_style_28_left";
550         inherit, "elm/label/base/slide_style_24_left";
551         parts {
552                 part {
553                         name, "elm.text";
554                         type, TEXTBLOCK;
555                         scale, 1;
556                         clip_to, "label.text.clip";
557                         description {
558                                 state, "default" 0.0;
559                                 rel1.relative, 0.0 0.0;
560                                 rel2.relative, 1.0 1.0;
561                                 align, 0.0 0.5;
562                                 text {
563                                         style, "text_style_28_left";
564                                         align, 0.0 1.0;
565                                         min, 0 1;
566                                 }
567                         }
568                         description {
569                                 state, "slide_end" 0.0;
570                                 inherit, "default" 0.0;
571                                 rel1.relative, 1.0 0.0;
572                                 rel2.relative, 1.0 1.0;
573                                 align, 1.0 0.5;
574                                 text {
575                                         style, "text_style_28_left";
576                                         align, 0.0 1.0;
577                                         min, 1 1;
578                                         ellipsis, -1.0;
579                                 }
580                         }
581                         description {
582                                 state, "slide_begin" 0.0;
583                                 inherit, "default" 0.0;
584                                 rel1.relative, 0.0 0.0;
585                                 rel2.relative, 0.0 1.0;
586                                 align, 0.0 0.5;
587                                 text {
588                                         style, "text_style_28_left";
589                                         align, 0.0 1.0;
590                                         min, 1 1;
591                                         ellipsis, -1.0;
592                                 }
593                         }
594                 }
595         }
596 }