Lockscreen refactor
[apps/core/preloaded/lockscreen.git] / res / edje / contextual_event.edc
1 /*
2  * Copyright (c) 2009-2014 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 group {
18         styles {
19                 style {
20                         name: "close_style";
21                         base: "font=Tizen:style=Regular color=#FFFFFF font_size=30 wrap=none align=center";
22                 }
23         }
24         images {
25                 image: "event_close_bg.#.png" COMP;
26         }
27         name: "contextual-event";
28         parts {
29                 part {
30                         name: "bg";
31                         type: SPACER;
32                         description {
33                                 state: "default" 0.0;
34                                 rel1 { relative: 0.0 0.0; }
35                                 rel2 { relative: 1.0 1.0; }
36                         }
37                 }
38                 part {
39                         name: "rect.event.area.bg";
40                         type: RECT;
41                         description {
42                                 state: "default" 0.0;
43                                 color: 0 0 0 50;
44                                 align: 0.0 0.0;
45                                 rel1 { relative: 0.0 0.0; }
46                                 rel2 { relative: 1.0 1.0; }
47                         }
48                 }
49                 part {
50                         name: "txt.close";
51                         type: TEXTBLOCK;
52                         repeat_events: 1;
53                         description {
54                                 state: "default" 0.0;
55                                 align: 1.0 0.0;
56                                 rel1 { relative: 1.0 0.0; to_x: "bg"; to_y: "rect.event.area.bg"; offset: -20 6; }
57                                 rel2 { relative: 1.0 0.0; to_x: "bg"; to_y: "rect.event.area.bg"; offset: -20 6; }
58                                 text {
59                                         style: "close_style";
60                                         min: 1 1;
61                                         ellipsis: -1;
62                                         align: 0.5 0.5;
63                                         text: "CLOSE";
64                                 }
65                         }
66                 }
67                 part {
68                         name: "btn.close";
69                         type: IMAGE;
70                         description {
71                                 state: "default" 0.0;
72                                 align: 1.0 0.0;
73                                 color: 100 100 100 100;
74                                 rel1 { to: "txt.close"; offset: -10 0; }
75                                 rel2 { to: "txt.close"; offset: 10 0; }
76                                 image {
77                                         normal: "event_close_bg.#.png";
78                                 }
79                         }
80                         description {
81                                 state: "press" 0.0;
82                                 inherit: "default" 0.0;
83                                 color: 50 50 50 50;
84                         }
85                 }
86                 part {
87                         name: "sw.genlist";
88                         type: SWALLOW;
89                         description {
90                                 state: "default" 0.0;
91                                 align: 0.0 0.0;
92                                 rel1 { relative: 0.0 1.0; to_x: "bg"; to_y: "btn.close"; offset: 0 6; }
93                         }
94                 }
95                 part {
96                         name: "rect.index";
97                         type: SPACER;
98                         description {
99                                 state: "default" 0.0;
100                                 align: 0.0 0.0;
101                                 rel1 { relative: 0.0 (CONTEXTUAL_INFO_DATE_HEIGHT+CONTEXTUAL_INFO_EVENT_AREA_HEIGHT)/CONTEXTUAL_INFO_HEIGHT; to: "bg"; }
102                                 rel2 { relative: 1.0 (CONTEXTUAL_INFO_DATE_HEIGHT+CONTEXTUAL_INFO_EVENT_AREA_HEIGHT+CONTEXTUAL_INFO_PAGE_INDICATOR_HEIGHT)/CONTEXTUAL_INFO_HEIGHT; to: "bg"; }
103                         }
104                 }
105                 part {
106                         name: "sw.index";
107                         type: SWALLOW;
108                         description {
109                                 state: "default" 0.0;
110                                 align: 0.5 0.5;
111                                 fixed: 1 1;
112                                 rel1 { relative: 0.5 0.5; to: "rect.index"; }
113                                 rel2 { relative: 0.5 0.5; to: "rect.index"; }
114                                 visible: 1;
115                         }
116                         description {
117                                 state: "hide" 0.0;
118                                 inherit: "default" 0.0;
119                                 visible: 0;
120                         }
121                 }
122         }
123         programs {
124                 program {
125                         name: "btn,close,press";
126                         signal: "mouse,down,1";
127                         source: "btn.close";
128                         action: STATE_SET "press" 0.0;
129                         target: "btn.close";
130                 }
131                 program {
132                         name: "btn,close,release";
133                         signal: "mouse,up,1";
134                         source: "btn.close";
135                         action: STATE_SET "default" 0.0;
136                         target: "btn.close";
137                 }
138                 program {
139                         name: "btn,close,clicked";
140                         signal: "mouse,clicked,1";
141                         source: "btn.close";
142                         action: SIGNAL_EMIT "btn,close,clicked" "contextual-event";
143                 }
144                 program {
145                         name: "hide,index";
146                         signal: "hide,index";
147                         source: "sw.index";
148                         action: STATE_SET "hide" 0.0;
149                         target: "sw.index";
150                 }
151                 program {
152                         name: "show,index";
153                         signal: "show,index";
154                         source: "sw.index";
155                         action: STATE_SET "default" 0.0;
156                         target: "sw.index";
157                 }
158         }
159 }