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