merge from 2.4 , block compile error
[apps/core/preloaded/quickpanel.git] / data / quickpanel_brightness.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
20 //#define DEBUG
21 //#define DEBUG_TEXT
22
23 #define BRIGHTNESS_ICON_COLOR "AO004"
24 #define BRIGHTNESS_TEXT_COLOR "AO014"
25
26         styles {
27                 style {
28                         name: "checkbox_text";
29                         base: "font=Tizen:style=Regular text_class=tizen font_size=24 color=#FFFFFF color_class="BRIGHTNESS_TEXT_COLOR" ellipsis=0.0 wrap=mixed";
30                 }
31         }
32
33         group {
34                 name: "quickpanel/brightness_controller/wrapper";
35                 parts {
36                         part { name: "base";
37                                 type: SPACER;
38                                 repeat_events: 1;
39                                 scale: 1;
40                                 description {
41                                         state: "default" 0.0;
42                                         min: 0 QP_THEME_LIST_ITEM_BRIGHTNESS_HEIGHT;
43                                         max: 9999 QP_THEME_LIST_ITEM_BRIGHTNESS_HEIGHT;
44                                         fixed: 1 1;
45                                         rel1 {
46                                                 relative: 0.0 0.0;
47                                         }
48                                         rel2 {
49                                                 relative: 1.0 0.0;
50                                         }
51                                         align: 0.0 0.0;
52                                 }
53                         }
54                         part { name: "elm.swallow.controller";
55                                 type: SWALLOW;
56                                 mouse_events: 1;
57                                 scale: 1;
58                                 description {
59                                         state: "default" 0.0;
60                                         fixed: 1 1;
61                                         rel1 {
62                                                 to: "base";
63                                         }
64                                         rel2 {
65                                                 to: "base";
66                                         }
67                                 }
68                         }
69                 }
70         }
71
72         group {
73                 name: "quickpanel/brightness_controller/default";
74
75                 images {
76                         image: "quick_icon_brightness.png" COMP;
77                         image: "quick_icon_brightness_00.png" COMP;
78                         image: "quick_icon_brightness_01.png" COMP;
79                         image: "quick_icon_brightness_02.png" COMP;
80                         image: "quick_icon_brightness_03.png" COMP;
81                         image: "quick_icon_brightness_04.png" COMP;
82                         image: "quick_icon_brightness_05.png" COMP;
83                         image: "quick_icon_brightness_06.png" COMP;
84                         image: "quick_icon_brightness_07.png" COMP;
85                         image: "quick_icon_brightness_08.png" COMP;
86                         image: "quick_icon_brightness_09.png" COMP;
87                         image: "quick_icon_brightness_10.png" COMP;
88                         image: "quick_icon_brightness_11.png" COMP;
89                         image: "core_theme_bg_01.png" COMP;
90                 }
91
92                 script {
93                         public ctnt_shown;
94                         public time_shown;
95                 }
96
97                 parts {
98                         part { name: "base";
99                                 type: RECT;
100                                 repeat_events: 1;
101                                 scale: 1;
102                                 description {
103                                         state: "default" 0.0;
104                                         min: 0 QP_THEME_LIST_ITEM_BRIGHTNESS_HEIGHT;
105                                         max: 9999 QP_THEME_LIST_ITEM_BRIGHTNESS_HEIGHT;
106                                         fixed: 1 1;
107                                         rel1 {
108                                                 relative: 0.0 0.0;
109                                         }
110                                         rel2 {
111                                                 relative: 1.0 0.0;
112                                         }
113                                         align: 0.0 0.0;
114                                         color_class: QP_BACKGROUND_COLOR;
115                                         visible: QP_THEME_BG_VISIBILITY;
116                                 }
117                         }
118
119                         part {
120                                 name: "background";
121                                 type: IMAGE;
122                                 scale: 1;
123                                 description {
124                                         state: "default" 0.0;
125                                         fixed: 1 1;
126                                         align: 0.5 0.5;
127                                         rel1 {
128                                                 to: "base";
129                                         }
130                                         rel2 {
131                                                 to: "base";
132                                         }
133                                         image {
134                                                 normal: "core_theme_bg_01.png";
135                                         }
136                                         visible: 0;
137                                 }
138                                 description {
139                                         state: "show.bg" 0.0;
140                                         inherit: "default" 0.0;
141                                         visible: 1;
142                                 }
143                                 description {
144                                         state: "hide.bg" 0.0;
145                                         inherit: "default" 0.0;
146                                         visible: 0;
147                                 }
148                         }
149
150                         part { name: "disabler";
151                                 type: RECT;
152                                 mouse_events: 0;
153                                 description {
154                                         state: "default" 0.0;
155                                         rel1 {
156                                                 to: "base";
157                                         }
158                                         rel2 {
159                                                 to: "base";
160                                         }
161                                         color_class: AO004;
162                                 }
163                                 description {
164                                         state: "disabled" 0.0;
165                                         inherit: "default" 0.0;
166                                         color_class: AO004D;
167                                 }
168                         }
169                         part { name: "bg_image";
170                                 type: RECT;
171                                 mouse_events: 0;
172                                 description {
173                                         state: "default" 0.0;
174                                         rel1.to:"base";
175                                         rel2.to:"base";
176                                         color_class: QP_THEME_BRIGHTNESS_BG_COLOR;
177                                         visible: QP_THEME_BG_VISIBILITY;
178                                 }
179                                 description {
180                                         state: "selected" 0.0;
181                                         inherit: "default" 0.0;
182                                         color_class: QP_THEME_BRIGHTNESS_BG_COLOR;
183                                 }
184                         }
185                         part { name: "elm.content.bg";
186                                 type: RECT;
187                                 scale: 1;
188                                 description {
189                                         state: "default" 0.0;
190                                         min: 9 0;
191                                         fixed: 1 0;
192                                         rel1 {
193                                                 to_x:"base";
194                                                 to_y:"base";
195                                                 relative: 1.0 0.0;
196                                         }
197                                         rel2 {
198                                                 to_x:"base";
199                                                 to_y:"base";
200                                                 relative: 0.0 1.0;
201                                         }
202                                         align: 0.0 0.0;
203                                         visible: 0;
204                                         //color_class: QP_BACKGROUND_COLOR;
205                                 }
206                         }
207                         QUICKPANEL_FOCUS_OBJECT("focus", "elm.content.bg", "elm.content.bg")
208                         part { name: "elm.padding.left";
209                                 type: RECT;
210                                 scale: 1;
211                                 description {
212                                         state: "default" 0.0;
213                                         min: 15 0;
214                                         max: 15 0;
215                                         fixed: 1 0;
216                                         rel1.to:"base";
217                                         rel2.to:"base";
218                                         rel2.relative: 0.0 0.0;
219                                         rel2.relative: 0.0 1.0;
220                                         align: 0.0 0.0;
221                                         visible: 0;
222                                 }
223                         }
224                         part { name: "elm.rect.thumbnail";
225                                 type: RECT;
226                                 mouse_events: 0;
227                                 scale: 1;
228                                 description {
229                                         state: "default" 0.0;
230                                         min: 42 42;
231                                         max: 42 42;
232                                         fixed: 1 1;
233                                         rel1 {
234                                                 to_x:"elm.padding.left";
235                                                 to_y:"base";
236                                                 relative: 1.0 0.0;
237                                         }
238                                         rel2 {
239                                                 to_x:"elm.padding.left";
240                                                 to_y:"base";
241                                                 relative: 1.0 1.0;
242                                         }
243                                         align: 0.0 0.5;
244                                         visible:0;
245                                 }
246                         }
247                         part { name: "elm.image.thumbnail";
248                                 type:IMAGE;
249                                 clip_to: "disabler";
250                                 scale:1;
251                                 description {
252                                         state: "default" 0.0;
253                                         fixed: 0 0;
254                                         rel1 {
255                                                 to: "elm.rect.thumbnail";
256                                         }
257                                         rel2 {
258                                                 to: "elm.rect.thumbnail";
259                                         }
260                                         image {
261                                                 normal:"quick_icon_brightness_00.png";
262                                         }
263                                 }
264                                 description {
265                                         state: "state.0" 0.0;
266                                         inherit: "default" 0.0;
267                                         image {
268                                                 normal:"quick_icon_brightness_00.png";
269                                         }
270                                 }
271                                 description {
272                                         state: "state.1" 0.0;
273                                         inherit: "default" 0.0;
274                                         image {
275                                                 normal:"quick_icon_brightness_01.png";
276                                         }
277                                 }
278                                 description {
279                                         state: "state.2" 0.0;
280                                         inherit: "default" 0.0;
281                                         image {
282                                                 normal:"quick_icon_brightness_02.png";
283                                         }
284                                 }
285                                 description {
286                                         state: "state.3" 0.0;
287                                         inherit: "default" 0.0;
288                                         image {
289                                                 normal:"quick_icon_brightness_03.png";
290                                         }
291                                 }
292                                 description {
293                                         state: "state.4" 0.0;
294                                         inherit: "default" 0.0;
295                                         image {
296                                                 normal:"quick_icon_brightness_04.png";
297                                         }
298                                 }
299                                 description {
300                                         state: "state.5" 0.0;
301                                         inherit: "default" 0.0;
302                                         image {
303                                                 normal:"quick_icon_brightness_05.png";
304                                         }
305                                 }
306                                 description {
307                                         state: "state.6" 0.0;
308                                         inherit: "default" 0.0;
309                                         image {
310                                                 normal:"quick_icon_brightness_06.png";
311                                         }
312                                 }
313                                 description {
314                                         state: "state.7" 0.0;
315                                         inherit: "default" 0.0;
316                                         image {
317                                                 normal:"quick_icon_brightness_07.png";
318                                         }
319                                 }
320                                 description {
321                                         state: "state.8" 0.0;
322                                         inherit: "default" 0.0;
323                                         image {
324                                                 normal:"quick_icon_brightness_08.png";
325                                         }
326                                 }
327                                 description {
328                                         state: "state.9" 0.0;
329                                         inherit: "default" 0.0;
330                                         image {
331                                                 normal:"quick_icon_brightness_09.png";
332                                         }
333                                 }
334                                 description {
335                                         state: "state.10" 0.0;
336                                         inherit: "default" 0.0;
337                                         image {
338                                                 normal:"quick_icon_brightness_10.png";
339                                         }
340                                 }
341                                 description {
342                                         state: "state.11" 0.0;
343                                         inherit: "default" 0.0;
344                                         image {
345                                                 normal:"quick_icon_brightness_11.png";
346                                         }
347                                 }
348                                 description {
349                                         state: "state.auto" 0.0;
350                                         inherit: "default" 0.0;
351                                         image {
352                                                 normal:"quick_icon_brightness.png";
353                                         }
354                                 }
355                         }
356                         part { name: "elm.padding.thumbnail.x";
357                                 type: RECT;
358                                 mouse_events: 0;
359                                 scale: 1;
360                                 description {
361                                         state: "default" 0.0;
362                                         min: 0 0;
363                                         fixed: 1 0;
364                                         rel1 {
365                                                 to:"elm.rect.thumbnail";
366                                                 relative: 1.0 0.0;
367                                         }
368                                         rel2 {
369                                                 to:"elm.rect.thumbnail";
370                                                 relative: 1.0 1.0;
371                                         }
372                                         align: 0.0 0.0;
373                                         visible: 0;
374                                 }
375                         }
376                         part { name: "elm.swallow.slider";
377                                 type: SWALLOW;
378                                 //clip_to: "disabler";
379                                 mouse_events: 1;
380                                 scale: 1;
381                                 description {
382                                         state: "default" 0.0;
383                                         fixed: 1 1;
384                                         rel1 {
385                                                 relative: 1.0 0.0;
386                                                 to: "elm.padding.thumbnail.x";
387                                         }
388                                         rel2 {
389                                                 relative: 0.0 1.0;
390                                                 to: "elm.padding.bf.check";
391                                         }
392                                 }
393                         }
394                         part { name: "elm.rect.slider";
395                                 type: RECT;
396                                 mouse_events: 1;
397                                 scale: 1;
398                                 description {
399                                         state: "default" 0.0;
400                                         min: 0 48;
401                                         fixed: 0 1;
402                                         rel1 {
403                                                 relative: 1.0 0.0;
404                                                 to_x: "elm.padding.thumbnail.x";
405                                                 to_y: "base";
406                                         }
407                                         rel2 {
408                                                 relative: 0.0 1.0;
409                                                 to_x: "elm.padding.bf.check";
410                                                 to_y: "base";
411                                         }
412                                         align: 0.0 0.5;
413                                         color: 0 0 0 0;
414                                         visible: 0;
415                                 }
416                                 description {
417                                         state: "disabled" 0.0;
418                                         inherit: "default" 0.0;
419                                         visible: 1;
420                                 }
421                         }
422                         part { name: "elm.padding.bf.check";
423                                 type: SPACER;
424                                 scale: 1;
425                                 description {
426                                         state: "default" 0.0;
427                                         rel1 {
428                                                 relative: 0.0 0.0;
429                                                 to: "elm.check.swallow";
430                                         }
431                                         rel2 {
432                                                 relative: 0.0 1.0;
433                                                 to: "elm.check.swallow";
434                                         }
435                                         align: 1.0 0.5;
436                                 }
437                         }
438
439                         part { name: "elm.check.swallow";
440                                 type: SWALLOW;
441                                 scale: 1;
442                                 description {
443                                         state: "default" 0.0;
444                                         rel1 {
445                                                 relative: 0.0 0.0;
446                                                 to: "elm.padding.bf.auto";
447                                         }
448                                         rel2 {
449                                                 relative: 0.0 1.0;
450                                                 to: "elm.padding.bf.auto";
451                                         }
452                                         align: 1.0 0.5;
453                                         min: 0 40;
454                                         fixed: 1 1;
455                                 }
456                         }
457
458                         part { name: "elm.padding.bf.auto";
459                                 type: SPACER;
460                                 scale: 1;
461                                 description {
462                                         state: "default" 0.0;
463                                         rel1 {
464                                                 relative: 0.0 0.0;
465                                                 to: "elm.rect.auto";
466                                         }
467                                         rel2 {
468                                                 relative: 0.0 1.0;
469                                                 to: "elm.rect.auto";
470                                         }
471                                         align: 1.0 0.5;
472                                         min: 0 0;
473                                         fixed: 1 0;
474                                 }
475                         }
476                         part { name: "elm.rect.auto";
477                                 type: SPACER;
478                                 scale: 1;
479                                 description {
480                                         state: "default" 0.0;
481                                         rel1 {
482                                                 relative : 0.0 0.0;
483                                                 to : "elm.check.text";
484                                         }
485                                         rel2 {
486                                                 relative : 1.0 1.0;
487                                                 to : "elm.check.text";
488                                         }
489                                 }
490                         }
491                         part { name: "elm.check.text";
492                                 type: TEXT;
493                                 scale: 1;
494                                 description {
495                                         state: "default" 0.0;
496                                         align : 1.0 0.5;
497                                         fixed : 1 1;
498                                         rel1 {
499                                                 relative : 0.0 0.5;
500                                                 to : "elm.padding.right";
501                                         }
502                                         rel2 {
503                                                 relative : 0.0 0.5;
504                                                 to : "elm.padding.right";
505                                         }
506                                         text {
507                                                 font : "Tizen:style=Regular";
508                                                 size : 22;
509                                                 text_class : "Tizen";
510                                                 align : 1.0 0.5;
511                                                 min : 1 1;
512                                         }
513                                         color_class: ATO019;
514                                 }
515                         }
516                         
517                         part { name: "elm.padding.right";
518                                 type: SPACER;
519                                 scale: 1;
520                                 description {
521                                         state: "default" 0.0;
522                                         rel1 {
523                                                 relative: 1.0 0.0;
524                                                 to: "base";
525                                         }
526                                         rel2 {
527                                                 relative: 1.0 1.0;
528                                                 to: "base";
529                                         }
530                                         align: 1.0 0.5;
531                                         min: 15 0;
532                                         fixed: 1 0;
533                                 }
534                         }
535                 }
536
537                 programs {
538                         program { name: "show_content";
539                                 signal: "elm,state,elm.swallow.slider,active";
540                                 source: "elm";
541                                 script {
542                                         set_state(PART:"elm.swallow.slider", "show", 0.0);
543                                         set_int(ctnt_shown, 1);
544                                 }
545                         }
546                         program { name: "go_active";
547                                 signal: "elm,state,selected";
548                                 source: "elm";
549                                 script {
550                                         set_state(PART:"bg_image", "selected", 0.0);
551                                         if (get_int(ctnt_shown) == 1)
552                                         set_state(PART:"elm.swallow.slider", "selected", 0.0);
553                                 }
554                         }
555                         program { name: "go_passive";
556                                 signal: "elm,state,unselected";
557                                 source: "elm";
558                                 script {
559                                         set_state(PART:"bg_image", "default", 0.0);
560                                         if (get_int(ctnt_shown) == 1)
561                                         set_state(PART:"elm.swallow.slider", "show", 0.0);
562                                 }
563                         }
564                         program{
565                                 name: "show.bg";
566                                 signal: "show.bg";
567                                 source: "prog.bg";
568                                 action: STATE_SET "show.bg" 0.0;
569                                 target: "background";
570                         }
571                         program{
572                                 name: "hide.bg";
573                                 signal: "hide.bg";
574                                 source: "prog.bg";
575                                 action: STATE_SET "hide.bg" 0.0;
576                                 target: "background";
577                         }
578                         program{
579                                 name: "icon.state.0";
580                                 signal: "icon.state.0";
581                                 source: "prog";
582                                 action: STATE_SET "state.0" 0.0;
583                                 target: "elm.image.thumbnail";
584                         }
585                         program{
586                                 name: "icon.state.1";
587                                 signal: "icon.state.1";
588                                 source: "prog";
589                                 action: STATE_SET "state.1" 0.0;
590                                 target: "elm.image.thumbnail";
591                         }
592                         program{
593                                 name: "icon.state.2";
594                                 signal: "icon.state.2";
595                                 source: "prog";
596                                 action: STATE_SET "state.2" 0.0;
597                                 target: "elm.image.thumbnail";
598                         }
599                         program{
600                                 name: "icon.state.3";
601                                 signal: "icon.state.3";
602                                 source: "prog";
603                                 action: STATE_SET "state.3" 0.0;
604                                 target: "elm.image.thumbnail";
605                         }
606                         program{
607                                 name: "icon.state.4";
608                                 signal: "icon.state.4";
609                                 source: "prog";
610                                 action: STATE_SET "state.4" 0.0;
611                                 target: "elm.image.thumbnail";
612                         }
613                         program{
614                                 name: "icon.state.5";
615                                 signal: "icon.state.5";
616                                 source: "prog";
617                                 action: STATE_SET "state.5" 0.0;
618                                 target: "elm.image.thumbnail";
619                         }
620                         program{
621                                 name: "icon.state.6";
622                                 signal: "icon.state.6";
623                                 source: "prog";
624                                 action: STATE_SET "state.6" 0.0;
625                                 target: "elm.image.thumbnail";
626                         }
627                         program{
628                                 name: "icon.state.7";
629                                 signal: "icon.state.7";
630                                 source: "prog";
631                                 action: STATE_SET "state.7" 0.0;
632                                 target: "elm.image.thumbnail";
633                         }
634                         program{
635                                 name: "icon.state.8";
636                                 signal: "icon.state.8";
637                                 source: "prog";
638                                 action: STATE_SET "state.8" 0.0;
639                                 target: "elm.image.thumbnail";
640                         }
641                         program{
642                                 name: "icon.state.9";
643                                 signal: "icon.state.9";
644                                 source: "prog";
645                                 action: STATE_SET "state.9" 0.0;
646                                 target: "elm.image.thumbnail";
647                         }
648                         program{
649                                 name: "icon.state.10";
650                                 signal: "icon.state.10";
651                                 source: "prog";
652                                 action: STATE_SET "state.10" 0.0;
653                                 target: "elm.image.thumbnail";
654                         }
655                         program{
656                                 name: "icon.state.11";
657                                 signal: "icon.state.11";
658                                 source: "prog";
659                                 action: STATE_SET "state.11" 0.0;
660                                 target: "elm.image.thumbnail";
661                         }
662                         program{
663                                 name: "icon.state.auto";
664                                 signal: "icon.state.auto";
665                                 source: "prog";
666                                 action: STATE_SET "state.auto" 0.0;
667                                 target: "elm.image.thumbnail";
668                         }
669                         program{
670                                 signal: "disable";
671                                 source: "disabler";
672                                 action: STATE_SET "default" 0.0;
673                                 target: "disabler";
674                                 target: "elm.rect.slider";
675                         }
676                         program{
677                                 signal: "enable";
678                                 source: "disabler";
679                                 action: STATE_SET "disabled" 0.0;
680                                 target: "disabler";
681                                 target: "elm.rect.slider";
682                         }
683                 }
684         }