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