edje: Add ... to not matching icon label
[apps/native/home/homescreen-efl.git] / res / edje / icon.edc
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 "../../inc/conf.h"
18
19 images {
20         image: "app_press_117.png" COMP;
21         image: "btn_delete_nor.png" COMP;
22         image: "btn_delete_press.png" COMP;
23         image: "app_icon_checkbox_bg.png" COMP;
24         image: "app_icon_checkbox_on.png" COMP;
25         image: "app_icon_checkbox_border.png" COMP;
26         image: "icon_badge_container.png" COMP;
27 }
28
29 styles {
30         style{
31                 name: "icon_label";
32                 base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=28 wrap=mixed ellipsis=1.0";
33         }
34         style{
35                 name: "icon_label_edit";
36                 base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=25 wrap=mixed ellipsis=1.0";
37         }
38 }
39
40 collections {
41         group {
42                 name: "app_icon_layout";
43                 script {
44                         public checkbox_state;
45                         public alpha;
46
47                         public message(Msg_Type:type, id, ...) {
48                                 if(type == MSG_INT_SET)
49                                 {
50                                         set_int(alpha, getarg(2));
51                                         send_message(type, id, getarg(2));
52                                 }
53                         }
54                 }
55                 parts {
56                         part { //"icon_bg"
57                                 name: "icon_bg";
58                                 type: SPACER;
59                                 mouse_events: 1;
60                                 repeat_events: 1;
61                                 scale: 0;
62                                 description {
63                                         state: "default" 0.0;
64                                         rel1{relative: 0.0 0.0; }
65                                         rel2{relative: 1.0 1.0; }
66                                 }
67                                 description {
68                                         state: "moved" 0.0;
69                                         inherit: "default" 0.0;
70                                 }
71                                 description {
72                                         state: "edit" 0.0;
73                                         inherit: "default" 0.0;
74                                 }
75                                 description
76                                 {
77                                         state: "manage_state" 0.0;
78                                         inherit: "default" 0.0;
79                                 }
80                         }
81
82                         part { //PART_ICON_CONTENT
83                                 name: PART_ICON_CONTENT;
84                                 type: SWALLOW;
85                                 mouse_events: 1;
86                                 repeat_events: 1;
87                                 scale: 0;
88                                 description {
89                                         state: "default" 0.0;
90                                         rel1{relative: ICON_X_MIN ICON_Y_MIN; to: "icon_bg";}
91                                         rel2{relative: ICON_X_MAX ICON_Y_MAX; to: "icon_bg";}
92                                 }
93                         }
94
95
96                         part { //"icon_content_touch"
97                                 name: "icon_content_touch";
98                                 type: IMAGE;
99                                 mouse_events: 1;
100                                 repeat_events: 1;
101                                 scale: 0;
102                                 description {
103                                         state: "default" 0.0;
104                                         rel1{relative: 0.0 0.0; to: PART_ICON_CONTENT;}
105                                         rel2{relative: 1.0 1.0; to: PART_ICON_CONTENT;}
106                                         aspect: 1.0 1.0;
107                                         aspect_preference: BOTH;
108                                         color: 0 0 0 0;
109                                         image {
110                                                 normal: "app_press_117.png";
111                                         }
112                                 }
113                                 description{
114                                         state: "icon_touched" 0.0;
115                                         inherit: "default" 0.0;
116                                         color: 0 0 0 150;
117                                 }
118                         }
119
120                         part { //PART_ICON_NAME
121                                 name: PART_ICON_NAME;
122                                 type: TEXTBLOCK;
123                                 mouse_events: 1;
124                                 repeat_events: 1;
125                                 scale: 1;
126                                 description {
127                                         state: "default" 0.0;
128                                         rel1{relative: ICON_NAME_X_MIN ICON_NAME_Y_MIN; to: "icon_bg";}
129                                         rel2{relative: ICON_NAME_X_MAX 1.0; to: "icon_bg";}
130                                         color: 255 255 255 255;
131                                         text {
132                                                 style: "icon_label";
133                                                 align: 0.5 0.0;
134                                         }
135                                 }
136                                 description {
137                                         state: "edit" 0.0;
138                                         inherit: "default" 0.0;
139                                         rel1{relative: ICON_NAME_X_MIN ICON_NAME_Y_MIN; to: "icon_bg";}
140                                         rel2{relative: ICON_NAME_X_MAX 1.0; to: "icon_bg";}
141                                         text {
142                                                 style: "icon_label_edit";
143                                         }
144                                 }
145                                 description {
146                                         state: "black_text" 0.0;
147                                         inherit: "default" 0.0;
148                                         color: 0 0 0 255;
149                                 }
150                                 description {
151                                         state: "black_edit" 0.0;
152                                         inherit: "black_text" 0.0;
153                                         text {
154                                                 style: "icon_label_edit";
155                                         }
156                                 }
157                         }
158
159
160                         /*************************** BADGE *************************************/
161
162                         part
163                         {
164                                 name: "icon_badge";
165                                 type: IMAGE;
166                                 scale: 0;
167                                 description
168                                 {
169                                         state: "default" 0.0;
170                                         rel1{relative: 0.0 0.0; offset: -10 -1; to: "icon_badge_text";}
171                                         rel2{relative: 1.0 1.0; offset: 9 1; to: "icon_badge_text";}
172                                         visible: 0;
173                                         image
174                                         {
175                                                 normal: "icon_badge_container.png";
176                                                 border: 15 14 0 0;
177                                         }
178                                 }
179                                 description
180                                 {
181                                         state: "visible" 0.0;
182                                         inherit: "default" 0.0;
183                                         visible: 1;
184                                 }
185                         }
186
187                         part
188                         {
189                                 name: "icon_badge_text";
190                                 type: TEXT;
191                                 scale: 1;
192                                 description
193                                 {
194                                         state: "default" 0.0;
195                                         visible: 0;
196                                         fixed: 1 1;
197                                         color: 255 255 255 255;
198                                         rel1{relative: BADGE_REL_X BADGE_REL_Y; to: "icon_bg";}
199                                         rel2{relative: BADGE_REL_X BADGE_REL_Y; to: "icon_bg";}
200                                         align: 1.0 0.0;
201                                         text
202                                         {
203                                                 font: "arial";
204                                                 size: 32;
205                                                 text_class: "ATO002";
206                                                 min: 1 1;
207                                                 max: 1 1;
208                                                 ellipsis: -1;
209                                         }
210                                 }
211                                 description
212                                 {
213                                         state: "visible" 0.0;
214                                         inherit: "default" 0.0;
215                                         visible: 1;
216                                 }
217                         }
218
219                         /*************************** END OF BADGE *************************************/
220
221                         part { //"icon_uninstall_button";
222                                 name: "icon_uninstall_button";
223                                 type: IMAGE;
224                                 scale: 0;
225                                 description {
226                                         state: "default" 0.0;
227                                         rel1{relative: 0.0 0.0; to: "icon_bg";}
228                                         rel2{relative: ICON_UNINSTALL_BTN_X_MAX ICON_UNINSTALL_BTN_Y_MAX; to: "icon_bg";}
229                                         color: 255 255 255 0;
230                                         visible: 0;
231                                         aspect: 1.0 1.0;
232                                         aspect_preference: BOTH;
233                                         image {
234                                                 normal: "btn_delete_nor.png";
235                                         }
236                                 }
237                                 description {
238                                         state: "show" 0.0;
239                                         inherit: "default" 0.0;
240                                         color: 255 255 255 255;
241                                         visible: 1;
242                                 }
243                                 description {
244                                         state: "press" 0.0;
245                                         inherit: "default" 0.0;
246                                         color: 255 255 255 255;
247                                         image {
248                                                 normal: "btn_delete_press.png";
249                                         }
250                                         visible: 1;
251                                 }
252                         }
253
254                         /*Icons checkboxes in choose state:*/
255                         part { //"icon_checkbox_bg";
256                                 name: "icon_checkbox_bg";
257                                 type: IMAGE;
258                                 scale: 0;
259                                 description {
260                                         state: "default" 0.0;
261                                         rel1{relative: ICON_BADGE_CHECKBOX_REL1_X ICON_BADGE_CHECKBOX_REL1_Y; to: "icon_bg";}
262                                         rel2{relative: ICON_BADGE_CHECKBOX_REL2_X ICON_BADGE_CHECKBOX_REL2_Y; to: "icon_bg";}
263                                         color: 255 255 255 120;
264                                         visible: 0;
265                                         aspect: 1.0 1.0;
266                                         aspect_preference: BOTH;
267                                         //TODO: image from home-lite is used...
268                                         image {
269                                                 normal: "app_icon_checkbox_bg.png";
270                                         }
271                                 }
272                                 description {
273                                         state: "blank" 0.0;
274                                         inherit: "default" 0.0;
275                                         visible: 1;
276                                 }
277                                 description {
278                                         state: "dimmed" 0.0;
279                                         inherit: "blank" 0.0;
280                                 }
281                                 description {
282                                         state: "checked" 0.0;
283                                         inherit: "default" 0.0;
284                                         //color_class: "ATO005";
285                                         color: 255 255 255 255;
286                                         visible: 1;
287                                 }
288                         }
289
290                         part { //"icon_checkbox_border";
291                                 name: "icon_checkbox_border";
292                                 type: IMAGE;
293                                 scale: 0;
294                                 description {
295                                         state: "default" 0.0;
296                                         rel1{relative: 0.0 0.0; to: "icon_checkbox_bg";}
297                                         rel2{relative: 1.0 1.0; to: "icon_checkbox_bg";}
298                                         color: 255 255 255 0;
299                                         visible: 0;
300                                         aspect: 1.0 1.0;
301                                         aspect_preference: BOTH;
302                                         image {
303                                                 normal: "app_icon_checkbox_border.png";
304                                         }
305                                 }
306                                 description {
307                                         state: "blank" 0.0;
308                                         inherit: "default" 0.0;
309                                         color: 255 255 255 255;
310                                         visible: 1;
311                                 }
312                                 description {
313                                         state: "dimmed" 0.0;
314                                         inherit: "blank" 0.0;
315                                 }
316                                 description {
317                                         state: "checked" 0.0;
318                                         inherit: "default" 0.0;
319                                         color: 255 255 255 120;
320                                         visible: 1;
321                                 }
322                         }
323
324                         part { //"icon_checkbox"
325                                 name: "icon_checkbox";
326                                 type: IMAGE;
327                                 scale: 0;
328                                 description {
329                                         state: "default" 0.0;
330                                         rel1{relative: 0.0 0.0; to: "icon_checkbox_bg";}
331                                         rel2{relative: 1.0 1.0; to: "icon_checkbox_bg";}
332                                         color: 255 255 255 0;
333                                         visible: 0;
334                                         aspect: 1.0 1.0;
335                                         aspect_preference: BOTH;
336                                         image {
337                                                 normal: "app_icon_checkbox_on.png";
338                                         }
339                                 }
340                                 description {
341                                         state: "blank" 0.0;
342                                         inherit: "default" 0.0;
343                                         color: 255 255 255 255;
344                                         visible: 0;
345                                 }
346                                 description {
347                                         state: "checked" 0.0;
348                                         inherit: "default" 0.0;
349                                         color: 255 255 255 255;
350                                         visible: 1;
351                                 }
352                                 description {
353                                         state: "dimmed" 0.0;
354                                         inherit: "checked" 0.0;
355                                 }
356                         }
357
358                         part { //checkbox_click_area
359                                 name: "checkbox_click_area";
360                                 type: RECT;
361                                 scale: 0;
362                                 description {
363                                         state: "default" 0.0;
364                                         color: 0 0 0 0;
365                                         rel1 {
366                                                 relative: -0.2 -0.2;
367                                                 to: "icon_checkbox";
368                                         }
369                                         rel2 {
370                                                 relative: 1.2 1.2;
371                                                 to: "icon_checkbox";
372                                         }
373                                         visible: 0;
374                                 }
375                                 description {
376                                         state: "visible" 0.0;
377                                         inherit: "default" 0.0;
378                                         visible: 1;
379                                 }
380                         }
381                 }
382
383                 programs {
384                         program {
385                                 name: "group_loaded";
386                                 signal: "load";
387                                 source: "";
388                                 script {
389                                         set_int(checkbox_state, 0);
390                                 }
391                         }
392                         program {
393                                 name: "icon_clicked_program";
394                                 signal :"mouse,clicked,1";
395                                 source: "icon_content";
396                                 action: SIGNAL_EMIT SIGNAL_ICON_CLICKED SIGNAL_SOURCE;
397                                 //after: program with change the icon shadow state to clicked!
398                         }
399
400                         program {
401                                 name: "icon_touch_program";
402                                 signal: SIGNAL_ICON_PRESS;
403                                 source: SIGNAL_PRESS_SOURCE;
404                                 action: STATE_SET "icon_touched" 0.0;
405                                 target: "icon_content_touch";
406                                 transition: LINEAR 0.1;
407                         }
408
409                         program {
410                                 name: "icon_touch_release_program";
411                                 signal: "mouse,up,1";
412                                 source: "icon_content_touch";
413                                 action: STATE_SET "default" 0.0;
414                                 target: "icon_content_touch";
415                                 transition: LINEAR 0.1;
416                         }
417                         program {
418                                 name: "edit_mode_on";
419                                 signal: SIGNAL_EDIT_MODE_ON;
420                                 source: SIGNAL_SOURCE;
421                                 action: STATE_SET "edit" 0.0;
422                                 target: PART_ICON_NAME;
423                         }
424                         program {
425                                 name: "edit_mode_off";
426                                 signal: SIGNAL_EDIT_MODE_OFF;
427                                 source: SIGNAL_SOURCE;
428                                 action: STATE_SET "default" 0.0;
429                                 target: PART_ICON_NAME;
430                         }
431                         program {
432                                 name: "edit_mode_black_on";
433                                 signal: SIGNAL_EDIT_MODE_BLACK_ON;
434                                 source: SIGNAL_SOURCE;
435                                 action: STATE_SET "black_edit" 0.0;
436                                 target: PART_ICON_NAME;
437                         }
438                         program {
439                                 name: "edit_mode_black_off";
440                                 signal: SIGNAL_EDIT_MODE_BLACK_OFF;
441                                 source: SIGNAL_SOURCE;
442                                 action: STATE_SET "black_text" 0.0;
443                                 target: PART_ICON_NAME;
444                         }
445                         program {
446                                 name: "uninstall_button_show";
447                                 signal: SIGNAL_UNINSTALL_BUTTON_SHOW;
448                                 source: SIGNAL_SOURCE;
449                                 action: STATE_SET "show" 0.0;
450                                 target: "icon_uninstall_button";
451                                 transition: DECELERATE 0.20;
452                         }
453                         program {
454                                 name: "uninstall_button_hide";
455                                 signal: SIGNAL_UNINSTALL_BUTTON_HIDE;
456                                 source: SIGNAL_SOURCE;
457                                 action: STATE_SET "default" 0.0;
458                                 target: "icon_uninstall_button";
459                                 transition: DECELERATE 0.20;
460                         }
461                         program {
462                                 name: "uninstall_button_clicked";
463                                 signal: "mouse,clicked,1";
464                                 source: "icon_uninstall_button";
465                                 action: SIGNAL_EMIT SIGNAL_UNINSTALL_BUTTON_CLICKED SIGNAL_SOURCE;
466                         }
467                         program {
468                                 name: "uninstall_button_mouse_down";
469                                 signal: "mouse,down,1";
470                                 source: "icon_uninstall_button";
471                                 action: STATE_SET "press" 0.0;
472                                 target: "icon_uninstall_button";
473                                 transition: DECELERATE 0.20;
474                         }
475                         program {
476                                 name: "uninstall_button_mouse_up";
477                                 signal: "mouse,up,1";
478                                 source: "icon_uninstall_button";
479                                 action: STATE_SET "show" 0.0;
480                                 target: "icon_uninstall_button";
481                                 transition: DECELERATE 0.20;
482                         }
483
484                         //Checkbox
485                         program {
486                                 name: "checkbox_show_unchecked";
487                                 signal: SIGNAL_CHECKBOX_SHOW_UNCHECKED;
488                                 source: SIGNAL_SOURCE;
489                                 script {
490                                         set_int(checkbox_state, 0);
491                                         emit("checkbox,blank,show", SIGNAL_SOURCE);
492                                 }
493                                 after: "checkbox_area_visible";
494                         }
495                         program {
496                                 name: "checkbox_show_checked";
497                                 signal: SIGNAL_CHECKBOX_SHOW_CHECKED;
498                                 source: SIGNAL_SOURCE;
499                                 script {
500                                         set_int(checkbox_state, 1);
501                                         emit("checkbox,checked,show", SIGNAL_SOURCE);
502                                 }
503                                 after: "checkbox_area_visible";
504                         }
505                         program {
506                                 name: "checkbox_show_dimmed";
507                                 signal: SIGNAL_CHECKBOX_SHOW_DIMMED;
508                                 source: SIGNAL_SOURCE;
509                                 script {
510                                         set_int(checkbox_state, 1);
511                                         emit("checkbox,dimmed,show", SIGNAL_SOURCE);
512                                 }
513                                 after: "checkbox_area_visible";
514                         }
515                         program {
516                                 name: "checkbox_blank_show";
517                                 signal: "checkbox,blank,show";
518                                 source: SIGNAL_SOURCE;
519                                 action: STATE_SET "blank" 0.0;
520                                 target: "icon_checkbox";
521                                 target: "icon_checkbox_border";
522                                 target: "icon_checkbox_bg";
523                         }
524                         program {
525                                 name: "checkbox_hide";
526                                 signal: SIGNAL_CHECKBOX_HIDE;
527                                 source: SIGNAL_SOURCE;
528                                 action: STATE_SET "default" 0.0;
529                                 target: "icon_checkbox";
530                                 target: "icon_checkbox_border";
531                                 target: "icon_checkbox_bg";
532                                 transition: DECELERATE 0.20;
533                                 after: "checkbox_area_hide";
534                         }
535                         program {
536                                 name: "checkbox_checked_show";
537                                 signal: "checkbox,checked,show";
538                                 source: SIGNAL_SOURCE;
539                                 action: STATE_SET "checked" 0.0;
540                                 target: "icon_checkbox";
541                                 target: "icon_checkbox_border";
542                                 target: "icon_checkbox_bg";
543                                 transition: DECELERATE 0.20;
544                         }
545                         program {
546                                 name: "checkbox_dimmed_show";
547                                 signal: "checkbox,dimmed,show";
548                                 source: SIGNAL_SOURCE;
549                                 action: STATE_SET "dimmed" 0.0;
550                                 target: "icon_checkbox";
551                                 target: "icon_checkbox_border";
552                                 target: "icon_checkbox_bg";
553                                 transition: DECELERATE 0.20;
554                         }
555                         program {
556                                 name: "checkbox_clicked";
557                                 signal: "mouse,clicked,1";
558                                 source: "checkbox_click_area";
559                                 script {
560                                         if (get_int(checkbox_state) == 0) {
561                                                 set_int(checkbox_state, 1); //isnt it deprecated?
562                                                 emit("checkbox,checked,show", SIGNAL_SOURCE); //signal for edje state change
563                                                 emit("checkbox,checked", SIGNAL_SOURCE); //signal for C listener
564                                         }
565                                         else {
566                                                 set_int(checkbox_state, 0);
567                                                 emit("checkbox,blank,show", SIGNAL_SOURCE); //signal for edje state change
568                                                 emit("checkbox,unchecked", SIGNAL_SOURCE); //signal for C listener
569                                         }
570                                 }
571                         }
572                         /*This is when ALLs are in management mode:*/
573                         program {
574                                 name: "set_manage_state_program";
575                                 signal: "set_manage_state";
576                                 source: SIGNAL_SOURCE;
577                                 action: STATE_SET "manage_state" 0.0;
578                                 target: "icon_bg";
579                                 transition: DECELERATE 0.2;
580                         }
581                         /*This is default for ALLs: */
582                         program {
583                                 name: "unset_manage_state_program";
584                                 signal: "unset_manage_state";
585                                 source: SIGNAL_SOURCE;
586                                 action: STATE_SET "default" 0.0;
587                                 target: "icon_bg";
588                                 transition: DECELERATE 0.2;
589                         }
590                         program {
591                                 name: "program_no_text";
592                                 signal: SIGNAL_LABEL_HIDE;
593                                 source: SIGNAL_SOURCE;
594                                 action: STATE_SET "no_text" 0.0;
595                                 target: PART_ICON_NAME;
596                         }
597                         program {
598                                 name: "program_black_text";
599                                 signal: "label,text,black";
600                                 source: SIGNAL_SOURCE;
601                                 action: STATE_SET "black_text" 0.0;
602                                 target: PART_ICON_NAME;
603                         }
604                         program {
605                                 name: "program_default";
606                                 signal: SIGNAL_LABEL_SHOW;
607                                 source: SIGNAL_SOURCE;
608                                 action: STATE_SET "default" 0.0;
609                                 target: PART_ICON_NAME;
610                                 transition: DECELERATE 0.20;
611                         }
612                         program {
613                                 name: "icon_badge_show";
614                                 signal: SIGNAL_BADGE_SHOW;
615                                 source: SIGNAL_SOURCE;
616                                 action: STATE_SET "visible" 0.0;
617                                 target: "icon_badge";
618                                 target: "icon_badge_text";
619                         }
620                         program {
621                                 name: "icon_badge_hide";
622                                 signal: SIGNAL_BADGE_HIDE;
623                                 source: SIGNAL_SOURCE;
624                                 action: STATE_SET "default" 0.0;
625                                 target: "icon_badge";
626                                 target: "icon_badge_text";
627                         }
628                         program {
629                                 name: "checkbox_area_visible";
630                                 action: STATE_SET "visible" 0.0;
631                                 target: "checkbox_click_area";
632                         }
633                         program {
634                                 name: "checkbox_area_hide";
635                                 action: STATE_SET "default" 0.0;
636                                 target: "checkbox_click_area";
637                         }
638                         program {
639                                 name: "area,clicked";
640                                 signal: "mouse,clicked,1";
641                                 source: "checkbox_click_area";
642                                 action: SIGNAL_EMIT "mouse,clicked,1" "icon_checkbox";
643                         }
644                         program {
645                                 name: "checkbox,block";
646                                 signal: SIGNAL_CHECKBOX_BLOCK;
647                                 source: SIGNAL_SOURCE;
648                                 action: STATE_SET "default" 0.0;
649                                 target: "checkbox_click_area";
650                         }
651                         program {
652                                 name: "checkbox,unblock";
653                                 signal: SIGNAL_CHECKBOX_UNBLOCK;
654                                 source: SIGNAL_SOURCE;
655                                 action: STATE_SET "visible" 0.0;
656                                 target: "checkbox_click_area";
657                         }
658                 }
659         }
660 }