sound-manager API changed
[apps/core/preloaded/quickpanel.git] / data / quickpanel_noti_section.edc
1 /*
2  * Copyright (c) 2009-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
18
19 //#define DEBUG
20 //#define DEBUG_TEXT
21
22 //Default part description. It is not changed by us
23 #define QP_THEME_LIST_TITLE_FONT_NAME                   "Tizen:style=Bold"
24 #define QP_THEME_LIST_TITLE_FONT_COLOR                  "ATO005"
25 #define QP_THEME_LIST_TITLE_FONT_SIZE                   27
26
27 #define QP_THEME_LIST_OPTION_FONT_COLOR                 "ATO006"
28 #define QP_THEME_LIST_OPTION_PRESS_FONT_COLOR   "ATO006P"
29 #define QP_THEME_LIST_OPTION_FONT_SIZE                  27
30 #define QP_THEME_LIST_OPTION_ICON_PRESS_COLOR "AO005"
31
32 //size of clear all item
33 #define QP_CLEAR_ALL_ITEM_H     51
34 #define QP_CLEAR_ALL_ITEM_W     480
35
36 //Properties of "notifications (x) label in clear all notifications item"
37 #define QP_CLEAR_ALL_NOTIFICATIONS_LABEL_FONT_NAME              "Tizen:style=Regular"
38 //#define QP_CLEAR_ALL_NOTIFICATIONS_LABEL_FONT_COLOR   "T023"
39 #define QP_CLEAR_ALL_NOTIFICATIONS_LABEL_FONT_COLOR     "A03O003L1"
40 #define QP_CLEAR_ALL_NOTIFICATIONS_LABEL_FONT_SIZE              27
41 #define QP_CLEAR_ALL_NOTIFICATIONS_STR_X_OFFSET 17 //x offset of "notifications(x)" string
42 #define QP_CLEAR_ALL_BASE_BG_COLOR                      "AO021"
43
44 //Properties of clear all button
45 #define QP_CLEAR_ALL_CLEAR_ALL_BTN_TEXT_FONT_NAME               "Tizen:style=Regular"
46 #define QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_COLOR                   "T112"
47 #define QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_COLOR_PRESSED           "ATO006P"
48 #define QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_COLOR_DIM               "ATO006D"
49 #define QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_SIZE                    20
50 #define QP_CLEAR_ALL_CLEAR_ALL_BTN_BG_COLOR                     "A03O003L1"
51 #define QP_CLEAR_ALL_CLEAR_ALL_BTN_BG_COLOR_PRESSED             "B0517P"
52
53 //Properties of separator betwen notifiactions label and clear all button
54 #define QP_NOTIFICATIONS_SEP_X_OFFSET -235 //separator between "notification(x) | Clear all" button
55 #define QP_NOTIFICATIONS_SEP_Y_OFFSET 17
56 #define QP_NOTIFICATIONS_SEP_COLOR_CLASS "W021L2"
57
58         images {
59                 image: "icon_arrow_up.png" COMP;
60                 image: "icon_arrow_down.png" COMP;
61                 image: "core_icon_badge_container.#.png" COMP;
62         }
63
64         group {
65                 name: "quickpanel/notisection/default";
66                 parts {
67                         part {
68                                 name: "base";
69                                 type: RECT;
70                                 repeat_events: 1;
71                                 scale: 1;
72                                 description {
73                                         state: "default" 0.0;
74                                         min: 0 QP_THEME_LIST_ITEM_NOTI_SECTION_HEIGHT;
75                                         max: 9999 QP_THEME_LIST_ITEM_NOTI_SECTION_HEIGHT;
76                                         rel1 {
77                                                 relative: 0.0 0.0;
78                                         }
79                                         rel2 {
80                                                 relative: 1.0 1.0;
81                                         }
82                                         align: 0.0 0.0;
83                                         color_class: QP_THEME_BG_COLOR;
84                                         visible: QP_THEME_BG_VISIBILITY;
85                                 }
86                         }
87                         QUICKPANEL_FOCUS_OBJECT("focus.label", "base", "base")
88                         part {
89                                 name: "elm.padding.left";
90                                 type: SPACER;
91                                 scale: 1;
92                                 description {
93                                         state: "default" 0.0;
94                                         min: 17 0;
95                                         fixed: 1 0;
96                                         rel1.to:"base";
97                                         rel2.to:"base";
98                                         rel1.relative: 0.0 0.0;
99                                         rel2.relative: 0.0 1.0;
100                                         align: 0.0 0.0;
101                                 }
102                         }
103                         part {
104                                 name: "elm.padding.right";
105                                 type: SPACER;
106                                 scale: 1;
107                                 description {
108                                         state: "default" 0.0;
109                                         min: 8 0;
110                                         fixed: 1 0;
111                                         rel1.to:"base";
112                                         rel2.to:"base";
113                                         rel1.relative: 1.0 0.0;
114                                         rel2.relative: 1.0 0.0;
115                                         align: 1.0 0.0;
116                                 }
117                         }
118                         part {
119                                 name: "elm.padding.top";
120                                 type: SPACER;
121                                 scale: 1;
122                                 description {
123                                         state: "default" 0.0;
124                                         min: 0 22;
125                                         fixed: 0 1;
126                                         rel1.to:"base";
127                                         rel2.to:"base";
128                                         rel1.relative: 0.0 0.0;
129                                         rel2.relative: 1.0 0.0;
130                                         align: 0.0 0.0;
131                                 }
132                         }
133                         part {
134                                 name: "elm.padding.bottom";
135                                 type: SPACER;
136                                 scale: 1;
137                                 description {
138                                         state: "default" 0.0;
139                                         min: 0 5;
140                                         fixed: 0 1;
141                                         rel1.to:"base";
142                                         rel2.to:"base";
143                                         rel1.relative: 0.0 1.0;
144                                         rel2.relative: 1.0 1.0;
145                                         align: 0.0 1.0;
146                                 }
147                         }
148                         part {
149                                 name: "elm.padding.top.button";
150                                 type: SPACER;
151                                 scale: 1;
152                                 description {
153                                         state: "default" 0.0;
154                                         min: 0 14;
155                                         fixed: 0 1;
156                                         rel1.relative: 0.0 0.0;
157                                         rel2.relative: 1.0 0.0;
158                                         align: 0.0 0.0;
159                                 }
160                         }
161                         part {
162                                 name: "elm.padding.bottom.button";
163                                 type: SPACER;
164                                 scale: 1;
165                                 description {
166                                         state: "default" 0.0;
167                                         min: 0 3;
168                                         fixed: 0 1;
169                                         rel1.relative: 0.0 1.0;
170                                         rel2.relative: 1.0 1.0;
171                                         align: 0.0 1.0;
172                                 }
173                         }
174                         part {
175                                 name: "elm.rect.text";
176                                 type: SPACER;
177                                 scale: 1;
178                                 description {
179                                         state: "default" 0.0;
180                                         min: 343 32;
181                                         fixed: 1 0;
182                                         rel1 {
183                                                 to_x: "elm.padding.left";
184                                                 to_y: "elm.padding.bottom";
185                                                 relative: 1.0 0.0;
186                                         }
187                                         rel2 {
188                                                 to_x: "elm.padding.left";
189                                                 to_y: "elm.padding.bottom";
190                                                 relative: 1.0 0.0;
191                                         }
192                                         align: 0.0 1.0;
193                                 }
194                         }
195                         part {
196                                 name: "elm.text.text";
197                                 type: TEXT;
198                                 scale: 1;
199                                 description {
200                                         state: "default" 0.0;
201                                         min: 343 35;
202                                         rel1 {
203                                                 to: "elm.rect.text";
204                                         }
205                                         rel2 {
206                                                 to: "elm.rect.text";
207                                         }
208                                         color: 0 0 0 255;
209                                         text {
210                                                 font: QP_THEME_LIST_TITLE_FONT_NAME;
211                                                 text_class: "tizen";
212                                                 size: QP_THEME_LIST_TITLE_FONT_SIZE;
213                                                 align: 0.0 0.5;
214                                                 min: 1 0;
215                                         }
216                                 }
217                         }
218                         part {
219                                 name: "elm.text.text.debug";
220                                 type: RECT;
221                                 description {
222                                         state: "default" 0.0;
223                                         rel1.relative: 0.0 0.0;
224                                         rel2.relative: 1.0 1.0;
225                                         rel1.to: "elm.text.text";
226                                         rel2.to: "elm.text.text";
227                                         color: 255 0 0 150;
228                                 }
229                 }
230
231                         part {
232                                 name: "elm.rect.icon";
233                                 type: SPACER;
234                                 scale: 1;
235                                 description {
236                                         state: "default" 0.0;
237                                         min: 106 36;
238                                         fixed: 1 1;
239                                         rel1 {
240                                                 to_x: "elm.padding.right";
241                                                 to_y: "base";
242                                                 relative: 0.0 0.5;
243                                         }
244                                         rel2 {
245                                                 to_x: "elm.padding.right";
246                                                 to_y: "base";
247                                                 relative: 0.0 0.5;
248                                         }
249                                         align: 1.0 0.0;
250                                 }
251                         }
252                         part {
253                                 name: "text.clear.right.padding";
254                                 type: SPACER;
255                                 scale: 1;
256                                 description {
257                                         state: "default" 0.0;
258                                         min: (18) 0;
259                                         rel1 {
260                                                 relative : 1.0 0.0;
261                                                 to: "base";
262                                         }
263                                         rel2 {
264                                                 relative : 1.0 1.0;
265                                                 to: "base";
266                                         }
267                                         align: 1.0 0.0;
268                                 }
269                         }
270                         part {
271                                 name: "text.clear";
272                                 type: TEXT;
273                                 scale: 1;
274                                 description {
275                                         state: "default" 0.0;
276                                         min: 0 30;
277                                         rel1 {
278                                                 to_x: "text.clear.right.padding";
279                                                 to_y: "elm.text.text";
280                                                 relative : 0.0 0.5;
281                                         }
282                                         rel2 {
283                                                 to_x: "text.clear.right.padding";
284                                                 to_y: "elm.text.text";
285                                                 relative: 0.0 0.5;
286                                         }
287                                         color_class: QP_THEME_LIST_OPTION_FONT_COLOR;
288                                         text {
289                                                 font: QP_THEME_LIST_TITLE_FONT_NAME;
290                                                 text_class: "tizen";
291                                                 size: QP_THEME_LIST_OPTION_FONT_SIZE;
292                                                 align: 0.0 0.5;
293                                                 min: 1 0;
294                                         }
295                                         align: 1.0 0.5;
296                                 }
297                                 description {
298                                         state: "pressed" 0.0;
299                                         inherit: "default" 0.0;
300                                         color_class: QP_THEME_LIST_OPTION_PRESS_FONT_COLOR;
301                                 }
302                         }
303                         part {
304                                 name: "divider.right.padding";
305                                 type: SPACER;
306                                 scale: 1;
307                                 description {
308                                         state: "default" 0.0;
309                                         min: (13) 0;
310                                         rel1 {
311                                                 relative : 0.0 0.0;
312                                                 to: "text.clear";
313                                         }
314                                         rel2 {
315                                                 relative : 0.0 1.0;
316                                                 to: "text.clear";
317                                         }
318                                         align: 1.0 0.0;
319                                 }
320                         }
321                         part {
322                                 name: "obj.divider";
323                                 type: RECT;
324                                 scale: 1;
325                                 description {
326                                         state: "default" 0.0;
327                                         min: 2 30;
328                                         rel1 {
329                                                 relative : 0.0 0.5;
330                                                 to_x: "divider.right.padding";
331                                                 to_y: "text.clear";
332                                         }
333                                         rel2 {
334                                                 relative : 0.0 0.5;
335                                                 to_x: "divider.right.padding";
336                                                 to_y: "text.clear";
337                                         }
338                                         align: 1.0 0.5;
339                                         color_class: QP_THEME_SECTION_ICON_DIVIDER_COLOR;
340                                         visible: 1;
341                                 }
342                         }
343                         part {
344                                 name: "rect.text.touch";
345                                 type: RECT;
346                                 scale: 1;
347                                 mouse_events: 1;
348                                 description {
349                                         state: "default" 0.0;
350                                         fixed: 1 1;
351                                         rel1 {
352                                                 to: "text.clear";
353                                                 offset: -10 -20;
354                                         }
355                                         rel2 {
356                                                 to: "text.clear";
357                                                 offset: +10 +20;
358                                         }
359                                         align: 0.0 0.0;
360                                         visible: 1;
361                                         color: 0 0 0 0;
362                                 }
363                         }
364                 }
365
366                 programs {
367                         program{
368                                 name: "button.down";
369                                 signal: "mouse,down,1";
370                                 source: "rect.text.touch";
371                                 action: STATE_SET "pressed" 0.0;
372                                 target: "text.clear";
373                         }
374                         program{
375                                 name: "button.up";
376                                 signal: "mouse,up,1";
377                                 source: "rect.text.touch";
378                                 action: STATE_SET "default" 0.0;
379                                 target: "text.clear";
380                         }
381                         program{
382                                 name: "button.clicked";
383                                 signal: "mouse,clicked,1";
384                                 source: "rect.text.touch";
385                                 action: SIGNAL_EMIT "button.clicked" "prog";
386                         }
387                 }
388         }
389
390         group {
391
392                 /**
393                  * GROUP STRUCTURE
394                  * base - it is the background rectangle. This part is a relative for all other parts and define background color.
395                  * noti.clear.all.separator - is the line between "notification(X)" and clear all button
396                  */
397
398                 name: "quickpanel/notisection/clear_all";
399                 parts {
400                         part {
401                                 name: "base";
402                                 type: RECT;
403                                 scale: 1;
404                                 description
405                                 {
406                                         state: "default" 0.0;
407                                         min: 0 QP_CLEAR_ALL_ITEM_H;
408                                         rel1 {
409                                                 relative: 0.0 0.0;
410                                         }
411                                         rel2 {
412                                                 relative: 1.0 1.0;
413                                         }
414                                         align: 0.0 0.0;
415                                         color_class: QP_CLEAR_ALL_BASE_BG_COLOR;
416                                         visible: 1;
417                                 }
418                         }
419                         part {
420                                 name: "notisection.padding.left";
421                                 type: SPACER;
422                                 scale: 1;
423                                 description {
424                                         state: "default" 0.0;
425                                         min: 17 0;
426                                         fixed: 1 0;
427                                         align: 0.0 0.0;
428                                         rel1 {
429                                                 to: "base";
430                                                 relative: 0.0 0.0;
431                                         }
432                                         rel2 {
433                                                 to: "base";
434                                                 relative: 0.0 1.0;
435                                         }
436                                 }
437                         }
438                         part {
439                                 name: "notisection.padding.right";
440                                 type: SPACER;
441                                 scale: 1;
442                                 description {
443                                         state: "default" 0.0;
444                                         min: 17 0;
445                                         fixed: 1 0;
446                                         align: 1.0 0.0;
447                                         rel1 {
448                                                 to: "base";
449                                                 relative: 1.0 0.0;
450                                         }
451                                         rel2 {
452                                                 to: "base";
453                                                 relative: 1.0 1.0;
454                                         }
455                                 }
456                         }
457
458                         part {
459                                 name: "underline";
460                                 type: RECT;
461                                 scale: 1;
462                                 description {
463                                         state: "default" 0.0;
464                                         min: 0 1;
465                                         fixed: 0 1;
466                                         rel1 {
467                                                 to: "base";
468                                                 relative: 0.0 1.0;
469                                         }
470                                         rel2 {
471                                                 to: "base";
472                                                 relative: 1.0 1.0;
473                                         }
474                                         align: 0.0 1.0;
475                                         color_class: QP_NOTIFICATIONS_SEP_COLOR_CLASS;
476                                 }
477                         }
478
479                         part {
480                                 name: "noti.clear.all.separator";
481                                 type: RECT;
482                                 scale: 1;
483                                 description {
484                                         state: "default";
485                                         min: 1 36;
486                                         max: 1 36;
487                                         fixed: 1 1;
488                                         color_class: QP_NOTIFICATIONS_SEP_COLOR_CLASS;
489                                         rel1 {
490                                                 relative: 0.0 0.0;
491                                                 to_x: "clear_all.padding.left";
492                                                 to_y: "base";
493                                         }
494                                         rel2 {
495                                                 relative: 0.0 1.0;
496                                                 to_x: "clear_all.padding.left";
497                                                 to_y: "base";
498                                         }
499
500                                         align: 1.0 0.5;
501                                         visible: 0;
502                                 }
503                                 description
504                                 {
505                                         state: "hide" 0.0;
506                                         inherit: "default";
507                                         visible: 0;
508                                 }
509
510                         }
511                         part {
512                                 name: "separator.padding.left";
513                                 type: SPACER;
514                                 scale: 1;
515                                 description {
516                                         state: "default" 0.0;
517                                         min: 17 0;
518                                         fixed: 1 0;
519                                         align: 1.0 0.0;
520                                         rel1 {
521                                                 to: "noti.clear.all.separator";
522                                                 relative: 0.0 0.0;
523                                         }
524                                         rel2 {
525                                                 to: "noti.clear.all.separator";
526                                                 relative: 0.0 1.0;
527                                         }
528                                 }
529                         }
530
531                         part {
532                                 name: "elm.text.notifications_number";
533                                 type: TEXT;
534                                 scale: 1;
535                                 description {
536                                         state: "default" 0.0;
537                                         min: 0 36;
538                                         align: 0.0 0.5;
539                                         rel1 {
540                                                 to: "notisection.padding.left";
541                                                 relative: 1.0 0.0;
542                                         }
543                                         rel2
544                                         {
545                                                 relative: 0.0 1.0;
546                                                 to_x: "separator.padding.left";
547                                                 to_y: "base";
548                                         }
549
550                                         color_class: QP_CLEAR_ALL_NOTIFICATIONS_LABEL_FONT_COLOR;
551                                         text {
552                                                 font: QP_CLEAR_ALL_NOTIFICATIONS_LABEL_FONT_NAME;
553                                                 size: QP_CLEAR_ALL_NOTIFICATIONS_LABEL_FONT_SIZE;
554                                                 text_class: "tizen";
555                                                 align: 0.0 0.5;
556                                                 ellipsis: 0.0;
557                                         }
558                                 }
559                         }
560                         part {
561                                 name: "rect.button.clear_all";
562                                 type: IMAGE;
563                                 scale: 1;
564                                 description {
565                                         state: "default" 0.0;
566                                         min: 75 36;
567                                         max: 130 36;
568                                         fixed: 1 1;
569                                         rel1 {
570                                                 relative: 0.0 0.0;
571                                         }
572                                         rel2 {
573                                                 to_x: "notisection.padding.right";
574                                                 to_y: "underline";
575                                                 relative: 0.0 0.0;
576                                         }
577
578                                         image {
579                                                 normal:"core_icon_badge_container.#.png";
580                                         }
581                                         color_class: QP_CLEAR_ALL_CLEAR_ALL_BTN_BG_COLOR;
582                                         align: 1.0 0.5;
583                                         visible: 1;
584                                 }
585                                 description
586                                 {
587                                         state: "pressed" 0.0;
588                                         inherit: "default" 0.0;
589                                         color_class: QP_CLEAR_ALL_CLEAR_ALL_BTN_BG_COLOR_PRESSED;
590                                 }
591
592                                 description
593                                 {
594                                         state: "hide" 0.0;
595                                         inherit: "default";
596                                         visible: 0;
597                                 }
598                         }
599
600                         part {
601                                 name: "text.button.clear_all";
602                                 type: TEXT;
603                                 scale: 1;
604                                 description
605                                 {
606                                         state: "default" 0.0;
607                                         min: 75 36;
608                                         max: 130 36;
609                                         fixed: 0 1;
610                                         align: 0.5 0.0;
611                                         rel1 {
612                                                 to: "rect.button.clear_all";
613                                                 relative: 0.0 0.0;
614                                         }
615                                         rel2 {
616                                                 to: "notisection.padding.right";
617                                                 relative: 0.0 1.0;
618                                         }
619                                         color_class: QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_COLOR;
620                                         text {
621                                                 font: QP_CLEAR_ALL_CLEAR_ALL_BTN_TEXT_FONT_NAME;
622                                                 size: QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_SIZE;
623                                                 text_class: "tizen";
624                                                 align: 0.5 0.5;
625                                                 max: 1 0;
626                                         }
627                                         visible: 1;
628                                 }
629                                 description
630                                 {
631                                         state: "pressed";
632                                         inherit: "default";
633                                         color_class: QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_COLOR_PRESSED;
634                                 }
635                                 description
636                                 {
637                                         state: "dim";
638                                         inherit: "default";
639                                         color_class: QP_CLEAR_ALL_CLEAR_ALL_BTN_FONT_COLOR_DIM;
640                                 }
641
642                                 description
643                                 {
644                                         state: "hide" 0.0;
645                                         inherit: "default";
646                                         visible: 0;
647                                 }
648                         }
649                         part {
650                                 name: "clear_all.padding.left";
651                                 type: SPACER;
652                                 scale: 1;
653                                 description {
654                                         state: "default" 0.0;
655                                         min: 17 0;
656                                         fixed: 1 0;
657                                         align: 1.0 0.0;
658                                         rel1 {
659                                                 to_x: "text.button.clear_all";
660                                                 to_y: "base";
661                                                 relative: 0.0 0.0;
662                                         }
663                                         rel2 {
664                                                 to_x: "text.button.clear_all";
665                                                 to_y: "base";
666                                                 relative: 0.0 1.0;
667                                         }
668                                 }
669                         }
670                         QUICKPANEL_FOCUS_OBJECT("focus", "rect.button.clear_all", "rect.button.clear_all")
671                 }
672                 programs
673                 {
674
675                         program
676                         {
677                                 name: "clear_all.button.pressed";
678                                 signal: "mouse,down,1";
679                                 source: "focus";
680
681                                 action: STATE_SET "pressed" 0.0;
682                                 target: "rect.button.clear_all";
683                                 target: "text.button.clear_all";
684                         }
685                         program
686                         {
687                                 name: "clear_all.button.released";
688                                 signal: "mouse,up,1";
689                                 source: "focus";
690
691                                 action: STATE_SET "default" 0.0;
692                                 target: "rect.button.clear_all";
693                                 target: "text.button.clear_all";
694                         }
695                         program
696                         {
697                                 name: "clear_all,show";
698                                 signal: "notifaction,section,clear_all,show";
699                                 source: "base";
700
701                                 action: STATE_SET "default" 0.0;
702                                 target: "rect.button.clear_all";
703                                 target: "text.button.clear_all";
704                                 target: "noti.clear.all.separator";
705                                 target: "focus";
706                         }
707
708                         program
709                         {
710                                 name: "clear_all,hide";
711                                 signal: "notifaction,section,clear_all,hide";
712                                 source: "base";
713
714                                 action: STATE_SET "hide" 0.0;
715                                 target: "rect.button.clear_all";
716                                 target: "text.button.clear_all";
717                                 target: "noti.clear.all.separator";
718                                 target: "focus";
719                         }
720                 }
721         }
722
723         group {
724                 name: "quickpanel/seperator/default";
725                 parts {
726                         part { name: "base";
727                                 type: RECT;
728                                 repeat_events: 1;
729                                 scale: 1;
730                                 description {
731                                         state: "default" 0.0;
732                                         min: 0 1;
733                                         max: 9999 1;
734                                         rel1 {
735                                                 relative: 0.0 0.0;
736                                         }
737                                         rel2 {
738                                                 relative: 1.0 0.0;
739                                         }
740                                         align: 0.0 0.0;
741                                         color: 255 0 0 100;
742                                         visible: 1;
743                                 }
744                         }
745                 }
746         }