tizen 2.4 release
[apps/home/quickpanel.git] / data / quickpanel_datetime.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 images {
21         image: "icon_indicator_setting.png" COMP;
22         image: "line_indicator_divider.png" COMP;
23         image: "bg_press.#.png" COMP;
24 }
25
26 styles {
27         style {
28                 name: "font_time_am_pm_style";
29                 base: "font=Tizen:style=Regular  font_size=22 valign=middle  ellipsis=1.0 wrap=none";
30                 tag: "time" "+ color=#FFFFFF ";
31                 tag: "ampm" "+ color=#FFFFFF ";
32         }
33
34         style {
35                 name: "font_date_style";
36                 base: "font=Tizen:style=Regular  font_size=22 color=#FFFFFF valign=middle color_class=tizen  ellipsis=1.0 wrap=none";
37         }
38 }
39
40 group {
41         name: "quickpanel/datetime";
42
43         script {
44                 public g_is_timedate_clickable;
45         }
46
47         parts {
48                 part { name: "base";
49                         type: RECT;
50                         repeat_events: 1;
51                         scale: 1;
52                         description {
53                                 state: "default" 0.0;
54                                 color_class: QP_BACKGROUND_COLOR;
55                                 visible: 0;
56                         }
57                 }
58                 QUICKPANEL_FOCUS_OBJECT("focus", "base", "base")
59
60                 part { name: "space.button.setting";
61                         type: SPACER;
62                         scale: 1;
63                         description {
64                                 state: "default" 0.0;
65                                 min: 60 0;
66                                 fixed: 1 0;
67                                 align: 1.0 0.5;
68                                 rel1 {
69                                         relative : 1.0 0.0;
70                                         to: "base";
71                                 }
72                                 rel2 {
73                                         relative : 1.0 1.0;
74                                         to: "base";
75                                 }
76                         }
77                 }
78                 QUICKPANEL_FOCUS_OBJECT("focus.setting", "space.button.setting", "space.button.setting")
79
80                 part { name: "space.divider";
81                         type: SPACER;
82                         scale: 1;
83                         description {
84                                 state: "default" 0.0;
85                                 min: 1 0;
86                                 fixed: 1 0;
87                                 align: 1.0 0.5;
88                                 rel1 {
89                                         relative : 0.0 0.0;
90                                         to: "space.button.setting";
91                                 }
92                                 rel2 {
93                                         relative : 0.0 1.0;
94                                         to: "space.button.setting";
95                                 }
96                         }
97                 }
98
99                 part {
100                         name: "space.datetime";
101                         type: SPACER;
102                         scale: 1;
103                         description {
104                                 state: "default" 0.0;
105                                 rel1 {
106                                         relative : 0.0 0.0;
107                                         to: "base";
108                                 }
109                                 rel2 {
110                                         relative : 0.0 1.0;
111                                         to: "space.divider";
112                                 }
113                         }
114                 }
115                 QUICKPANEL_FOCUS_OBJECT("focus.datetime", "space.datetime", "space.datetime")
116
117                 part { name: "image.button.setting.bg";
118                         type: IMAGE;
119                         scale: 1;
120                         description {
121                                 state: "default" 0.0;
122                                 min: 0 36;
123                                 fixed: 0 1;
124                                 align: 0.0 0.5;
125                                 rel1 {
126                                         relative: 0.0 0.5;
127                                         to: "space.button.setting";
128                                 }
129                                 rel2 {
130                                         relative: 1.0 0.5;
131                                         to: "space.button.setting";
132                                 }
133                                 image {
134                                         normal: "bg_press.#.png";
135                                 }
136                                 color_class: "F043P";
137                                 visible: 0;
138                         }
139                         description {
140                                 state: "pressed" 0.0;
141                                 inherit: "default";
142                                 visible: 1;
143                         }
144                 }
145
146                 part { name: "image.datetime.bg";
147                         type: IMAGE;
148                         scale: 1;
149                         description {
150                                 state: "default" 0.0;
151                                 min: 0 36;
152                                 fixed: 0 1;
153                                 align: 0.0 0.5;
154                                 rel1 {
155                                         relative : 0.0 0.5;
156                                         to: "space.datetime";
157                                 }
158                                 rel2 {
159                                         relative : 1.0 0.5;
160                                         to: "space.datetime";
161                                 }
162                                 image {
163                                         normal: "bg_press.#.png";
164                                 }
165                                 color_class: "F043P";
166                                 visible: 0;
167                         }
168                         description {
169                                 state: "pressed" 0.0;
170                                 inherit: "default";
171                                 visible: 1;
172                         }
173                 }
174
175                 part { name: "image.button.setting";
176                         type: IMAGE;
177                         mouse_events: 0;
178                         scale: 1;
179                         description {
180                                 state: "default" 0.0;
181                                 min: 42 42;
182                                 fixed: 1 1;
183                                 align: 0.5 0.5;
184                                 rel1 {
185                                         relative: 0.5 0.5;
186                                         to: "space.button.setting";
187                                 }
188                                 rel2 {
189                                         relative: 0.5 0.5;
190                                         to: "space.button.setting";
191                                 }
192                                 image {
193                                         normal:"icon_indicator_setting.png";
194                                 }
195                                 color_class: "AO025";
196                         }
197                 }
198
199                 part { name: "image.divider";
200                         type: IMAGE;
201                         scale: 1;
202                         description {
203                                 state: "default" 0.0;
204                                 min: 1 24;
205                                 fixed: 1 1;
206                                 align: 0.5 0.5;
207                                 rel1 {
208                                         relative: 0.5 0.5;
209                                         to: "space.divider";
210                                 }
211                                 rel2 {
212                                         relative: 1.0 0.5;
213                                         to: "space.divider";
214                                 }
215                                 image {
216                                         normal: "line_indicator_divider.png";
217                                 }
218                                 color_class: "AO003E1";
219                         }
220                 }
221
222                 part { name: "divider.padding.left";
223                         type: SPACER;
224                         scale: 1;
225                         description {
226                                 state: "default" 0.0;
227                                 min: 15 0;
228                                 fixed: 1 0;
229                                 align: 1.0 0.5;
230                                 rel1 {
231                                         relative: 0.0 0.0;
232                                         to: "space.divider";
233                                 }
234                                 rel2 {
235                                         relative: 0.0 1.0;
236                                         to: "space.divider";
237                                 }
238                         }
239                 }
240
241                 part { name: "text.time";
242                         type: TEXTBLOCK;
243                         mouse_events: 0;
244                         scale: 1;
245                         description {
246                                 state: "default" 0.0;
247                                 min: 0 (3 + 30 + 3);
248                                 fixed: 0 1;
249                                 align: 1.0 0.5;
250                                 rel1 {
251                                         relative : 0.0 0.5;
252                                         to: "divider.padding.left";
253                                 }
254                                 rel2 {
255                                         relative : 0.0 0.5;
256                                         to: "divider.padding.left";
257                                 }
258                                 text {
259                                         style: "font_time_am_pm_style";
260                                         min: 1 0;
261                                         max: 1 0;
262                                         align: 1.0 0.5;
263                                 }
264                         }
265                 }
266
267                 part { name: "date.left.padding";
268                         type: SPACER;
269                         scale: 1;
270                         description {
271                                 state: "default" 0.0;
272                                 min: 15 0;
273                                 fixed: 1 0;
274                                 align: 0.0 0.0;
275                                 rel1 {
276                                         relative : 0.0 0.0;
277                                         to: "space.datetime";
278                                 }
279                                 rel2 {
280                                         relative : 0.0 1.0;
281                                         to: "space.datetime";
282                                 }
283                         }
284                 }
285
286                 part {
287                         name: "date.top.padding";
288                         type: SPACER;
289                         scale: 1;
290                         description {
291                                 state: "default" 0.0;
292                                 min: 0 0;
293                                 fixed: 0 1;
294                                 align: 0.0 0.0;
295                                 rel1 {
296                                         relative: 0.0 0.0;
297                                         to: "space.datetime";
298                                 }
299                                 rel2 {
300                                         relative: 1.0 0.0;
301                                         to: "space.datetime";
302                                 }
303                         }
304                 }
305
306                 part { name: "text.time.left.padding";
307                         type: SPACER;
308                         scale: 1;
309                         description {
310                                 state: "default" 0.0;
311                                 min: 15 0;
312                                 fixed: 1 0;
313                                 align: 1.0 0.0;
314                                 rel1 {
315                                         //relative : 0.0 0.0;
316                                         to: "text.time";
317                                 }
318                                 rel2 {
319                                         relative : 0.0 1.0;
320                                         to: "text.time";
321                                 }
322                         }
323                 }
324
325                 part { name: "text.date";
326                         type: TEXTBLOCK;
327                         mouse_events: 0;
328                         scale: 1;
329                         description {
330                                 state: "default" 0.0;
331                                 min: 0 (8 + 20 + 8);
332                                 fixed: 0 1;
333                                 align: 0.0 0.5;
334                                 rel1 {
335                                         relative : 1.0 1.0;
336                                         to_x: "date.left.padding";
337                                         to_y: "date.top.padding";
338                                 }
339                                 rel2 {
340                                         relative : 0.0 1.0;
341                                         to_x : "text.time.left.padding";
342                                         to_y: "space.datetime";
343                                 }
344                                 text {
345                                         style: "font_date_style";
346                                         min: 0 0;
347                                         max: 1 0;
348                                         align: 0.0 0.5;
349                                 }
350                         }
351                 }
352         }
353
354         programs {
355                 program {
356                         name: "timedate.init";
357                         signal: "load";
358                         script{
359                                 set_int(g_is_timedate_clickable, 1);
360                         }
361                 }
362                 program{
363                         name: "button.setting.down";
364                         signal: "mouse,down,*";
365                         source: "focus.setting";
366                         action: STATE_SET "pressed" 0.0;
367                         target: "image.button.setting.bg";
368                 }
369                 program{
370                         name: "button.setting.up";
371                         signal: "mouse,up,*";
372                         source: "focus.setting";
373                         action: STATE_SET "default" 0.0;
374                         target: "image.button.setting.bg";
375                 }
376                 program {
377                         name: "timendate.click.enable";
378                         signal: "timendate.click.enable";
379                         source: "prog";
380                         script {
381                                 set_int(g_is_timedate_clickable, 1);
382                         }
383                 }
384                 program {
385                         name: "timendate.click.disable";
386                         signal: "timendate.click.disable";
387                         source: "prog";
388                         script {
389                                 set_int(g_is_timedate_clickable, 0);
390                         }
391                 }
392                 program{
393                         name: "date_time.down";
394                         signal: "mouse,down,*";
395                         source: "focus.datetime";
396                         script {
397                                 if (get_int(g_is_timedate_clickable) == 1) {
398                                         set_state(PART:"image.datetime.bg", "pressed", 0.0);
399                                 }
400                         }
401                 }
402                 program{
403                         name: "date_time.up";
404                         signal: "mouse,up,*";
405                         source: "focus.datetime";
406                         action: STATE_SET "default" 0.0;
407                         target: "image.datetime.bg";
408                 }
409         }
410 }
411