e80cc403d754ad52bfbc844cea695836efebd8f8
[apps/core/preloaded/gallery.git] / res / white_theme / edc / gl-entry.edc
1 /*
2   * Copyright (c) 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 /* Refer to: "elm/layout/searchbar/cancel_button" */
19
20 #define ENTRY_TEXT_SIZE_INC 44
21
22 #define EDITFIELD_TITLE_SIZE_INC 32
23 #define EDITFIELD_TITLE_COLOR_INC 124 124 124 255
24 #define EDITFIELD_GUIDE_TEXT_COLOR_INC 144 169 199 255
25
26 #define SEARCHBAR_BACKGROUND_COLOR_INC 215 225 232 255
27 #define SEARCHBAR_CANCEL_BUTTON_W_INC 134
28 #define SEARCHBAR_CANCEL_BUTTON_WITH_PADDING_W_INC 150
29 #define SEARCHBAR_CANCEL_BUTTON_WITH_DOUBLE_PADDING_W_INC 166
30 #define SEARCHBAR_TOP_PADDING_INC 18
31 #define SEARCHBAR_BOTTOM_PADDING_INC 18
32 #define SEARCHBAR_HEIGHT_INC 74
33 #define SEARCHBAR_LEFT_PADDING_INC 16
34 #define SEARCHBAR_RIGHT_PADDING_INC 16
35 #define SEARCHBAR_INPUTFIELD_BORDER_INC 6 6 6 6
36 #define SEARCHBAR_LEFT_ICON_PADDING_INC 0
37 #define SEARCHBAR_ICON_MIN_W_INC 42
38 #define SEARCHBAR_ICON_MIN_H_INC 42
39 #define SEARCHBAR_LEFT_PADDING_SEARCHFIELD_INC 16
40 #define SEARCHBAR_RIGHT_PADDING_SEARCHFIELD_INC 8
41 #define SEARCHBAR_SEARCH_TEXTFIELD_H_INC 60
42
43 #define EDITFIELD_SEARCHBAR_TOP1_SINGLE_INC 6
44 #define EDITFIELD_SEARCHBAR_TOP1_MULTI_INC 10
45 #define EDITFIELD_SEARCHBAR_TOP2_INC 10
46 #define EDITFIELD_SEARCHBAR_LEFT1_INC 0
47 #define EDITFIELD_SEARCHBAR_LEFT2_INC 0
48 #define EDITFIELD_SEARCHBAR_RIGHT1_ERASER_SHOW_INC 56
49 #define EDITFIELD_SEARCHBAR_RIGHT2_INC 5
50 #define EDITFIELD_SEARCHBAR_BOTTOM1_SINGLE_INC 8
51 #define EDITFIELD_SEARCHBAR_BOTTOM1_MULTI_INC 2
52 #define EDITFIELD_SEARCHBAR_BOTTOM2_SINGLE_INC 16
53 #define EDITFIELD_SEARCHBAR_BOTTOM2_MULTI_INC 2
54 #define EDITFIELD_SEARCHBAR_BOTTOM3_SINGLE_INC 50
55 #define EDITFIELD_SEARCHBAR_BOTTOM3_MULTI_INC 50
56
57 #define EDITFIELD_SEARCHBAR_ERASER_MINW_INC 38
58 #define EDITFIELD_SEARCHBAR_ERASER_MINH_INC 38
59 #define EDITFIELD_SEARCHBAR_ERASER_EVENT_MINW_INC 38
60 #define EDITFIELD_SEARCHBAR_ERASER_EVENT_MINH_INC 50
61
62 group { name: "elm/layout/searchbar/gallery";
63    images {
64       image: GALLERY_EDC_IMAGE_EDITFIELD_CLEAR COMP;
65       image: GALLERY_EDC_IMAGE_EDITFIELD_CLEAR_PRESS COMP;
66       image: GALLERY_EDC_IMAGE_SEARCH_INPUT_FIELD_BG COMP;
67    }
68    parts {
69      part { name: "top_padding_rect";
70          type: RECT;
71          scale: 1;
72          description { state: "default" 0.0;
73             visible: 1;
74             min: 0 SEARCHBAR_TOP_PADDING_INC;
75             fixed: 0 1;
76             align: 0 0;
77             color: SEARCHBAR_BACKGROUND_COLOR_INC;
78             rel2.relative: 1.0 0.0;
79          }
80       }
81       part { name: "bottom_padding_rect";
82          type: RECT;
83          scale: 1;
84          description { state: "default" 0.0;
85             visible: 1;
86             min: 0 SEARCHBAR_BOTTOM_PADDING_INC;
87             fixed: 0 1;
88             align: 0 1;
89             color: SEARCHBAR_BACKGROUND_COLOR_INC;
90             rel1.relative: 0.0 1.0;
91          }
92       }
93       part { name: "base_bg";
94          type: RECT;
95          scale: 1;
96          description { state: "default" 0.0;
97             visible: 0;
98             min: 0 SEARCHBAR_HEIGHT_INC;
99             align: 0 0.5;
100             fixed: 0 1;
101             rel1 {
102                relative: 0.0 1.0;
103                to: "top_padding_rect";
104             }
105             rel2 {
106                relative: 1.0 0.0;
107                to: "bottom_padding_rect";
108             }
109          }
110       }
111       part { name: "left_padding_rect";
112          type: RECT;
113          scale: 1;
114          description { state: "default" 0.0;
115             visible: 1;
116             min: SEARCHBAR_LEFT_PADDING_INC 0;
117             fixed: 1 0;
118             align: 0 0;
119             rel2.relative: 0.0 1.0;
120             color: SEARCHBAR_BACKGROUND_COLOR_INC;
121          }
122       }
123       part { name: "right_padding_rect";
124          type: RECT;
125          scale: 1;
126          description { state: "default" 0.0;
127             visible: 1;
128             min: SEARCHBAR_RIGHT_PADDING_INC 0;
129             fixed: 1 0;
130             align: 1 0;
131             rel1.relative: 1.0 0.0;
132             color: SEARCHBAR_BACKGROUND_COLOR_INC;
133          }
134       }
135       part { name: "right_field_and_btn_padding_rect";
136          type: RECT;
137          scale: 1;
138          description { state: "default" 0.0;
139             visible: 1;
140             min: SEARCHBAR_CANCEL_BUTTON_WITH_DOUBLE_PADDING_W_INC 0;
141             fixed: 1 0;
142             align: 1 0;
143             rel1.relative: 1.0 0.0;
144             color: SEARCHBAR_BACKGROUND_COLOR_INC;
145          }
146       }
147       part { name: "right_btn_padding_rect";
148          type: RECT;
149          scale: 1;
150          description { state: "default" 0.0;
151             visible: 1;
152             min: SEARCHBAR_CANCEL_BUTTON_WITH_PADDING_W_INC 0;
153             fixed: 1 0;
154             align: 1 0;
155             rel1.relative: 1.0 0.0;
156             color: SEARCHBAR_BACKGROUND_COLOR_INC;
157          }
158       }
159       part { name: "inputfield_rect";
160          type: IMAGE;
161          scale: 1;
162          description { state: "default" 0.0;
163             align: 0.0 0.5;
164             rel1 {
165                relative: 1.0 0.0;
166                to_x: "left_padding_rect";
167                to_y: "base_bg";
168             }
169             rel2 {
170                relative: 0.0 1.0;
171                to_x: "right_padding_rect";
172                to_y: "base_bg";
173             }
174             image {
175                normal: GALLERY_EDC_IMAGE_SEARCH_INPUT_FIELD_BG;
176                border: SEARCHBAR_INPUTFIELD_BORDER_INC;
177             }
178          }
179          description { state: "in" 0.0;
180             inherit: "default" 0.0;
181             rel2.to_x: "right_field_and_btn_padding_rect";
182          }
183       }
184       part { name: "left_icon_padding_rect";
185          type: RECT;
186          scale: 1;
187          description { state: "default" 0.0;
188             visible: 0;
189             min: SEARCHBAR_LEFT_ICON_PADDING_INC 0;
190             fixed: 1 0;
191             align: 0 0;
192             rel1.to: "inputfield_rect";
193             rel2 {
194                relative: 0.0 1.0;
195                to: "inputfield_rect";
196             }
197          }
198       }
199       part { name: "left_padding_search_textfield";
200          type: RECT;
201          scale: 1;
202          description { state: "default" 0.0;
203             visible: 0;
204             min: SEARCHBAR_LEFT_PADDING_SEARCHFIELD_INC 0;
205             fixed: 1 0;
206             align: 0.0 0.5;
207             rel1 {
208                relative: 1.0 0.0;
209                to_x: "left_icon_padding_rect";
210                to_y: "inputfield_rect";
211             }
212             rel2 {
213                relative: 1.0 1.0;
214                to_x: "left_icon_padding_rect";
215                to_y: "inputfield_rect";
216             }
217          }
218       }
219       part { name: "right_padding_search_textfield";
220          type: RECT;
221          scale: 1;
222          description { state: "default" 0.0;
223             visible: 0;
224             min: SEARCHBAR_RIGHT_PADDING_SEARCHFIELD_INC 0;
225             fixed: 1 0;
226             align: 1.0 0.5;
227             rel1 {
228                relative: 1.0 0.0;
229                to: "inputfield_rect";
230             }
231             rel2 {
232                relative: 1.0 1.0;
233                to: "inputfield_rect";
234             }
235          }
236       }
237       part { name: "search_textfield";
238          type: RECT;
239          mouse_events: 1;
240          scale: 1;
241          ignore_flags: ON_HOLD;
242          description { state: "default" 0.0;
243             color: 0 0 0 0;
244             min: 0 SEARCHBAR_SEARCH_TEXTFIELD_H_INC;
245             fixed: 0 1;
246             align: 0.0 0.5;
247             rel1 {
248                relative: 1.0 0.0;
249                to: "left_padding_search_textfield";
250             }
251             rel2 {
252                relative: 0.0 1.0;
253                to: "right_padding_search_textfield";
254             }
255          }
256       }
257       part { name: "button_cancel";
258          type: SWALLOW;
259          mouse_events: 1;
260          scale: 1;
261          description { state: "default" 0.0;
262             visible: 0;
263             fixed: 1 1;
264             min: SEARCHBAR_CANCEL_BUTTON_W_INC 0;
265             align: 0.0 0.5;
266             state: "default" 0.0;
267             rel1 {
268                relative: 1.0 1.0;
269                to_x: "base_bg";
270                to_y: "top_padding_rect";
271             }
272             rel2 {
273                relative: 1.0 0.0;
274                to_x: "base_bg";
275                to_y: "bottom_padding_rect";
276             }
277          }
278          description { state: "in" 0.0;
279             visible:1;
280             min: SEARCHBAR_CANCEL_BUTTON_W_INC 0;
281             align: 1.0 0.5;
282             rel1 {
283                relative: 0.0 1.0;
284                to_x: "right_btn_padding_rect";
285                to_y: "top_padding_rect";
286             }
287             rel2 {
288                relative: 0.0 0.0;
289                to_x: "right_padding_rect";
290                to_y: "bottom_padding_rect";
291             }
292          }
293       }
294       part { name: "top1";
295          type: RECT;
296          scale: 1;
297          ignore_flags: ON_HOLD;
298          description { state: "default" 0.0;
299             visible: 0;
300             min: 0 EDITFIELD_SEARCHBAR_TOP1_SINGLE_INC;
301             fixed: 1 1;
302             rel1 {
303                relative: 0.0 0.0;
304                to: "search_textfield";
305             }
306             rel2 {
307                relative: 1.0 0.0;
308                to: "search_textfield";
309             }
310             align: 0.5 0;
311          }
312          description { state: "elm.text.show" 0.0;
313             inherit: "default" 0.0;
314             min: 0 EDITFIELD_SEARCHBAR_TOP1_MULTI_INC;
315          }
316       }
317       part { name: "top2";
318          type: RECT;
319          scale: 1;
320          ignore_flags: ON_HOLD;
321          description { state: "default" 0.0;
322             visible: 0;
323             min: 0 EDITFIELD_SEARCHBAR_TOP2_INC;
324             fixed: 1 1;
325             rel1 {
326                relative: 0.0 0.0;
327                to: "search_textfield";
328             }
329             rel2 {
330                relative: 1.0 0.0;
331                to: "search_textfield";
332             }
333             align: 0.5 0;
334          }
335       }
336       part { name: "left1";
337          type: RECT;
338          scale: 1;
339          ignore_flags: ON_HOLD;
340          description { state: "default" 0.0;
341             visible: 0;
342             min: EDITFIELD_SEARCHBAR_LEFT1_INC 0;
343             fixed: 1 1;
344             align: 0 0;
345             rel1 {
346                relative: 0.0 0.0;
347                to: "search_textfield";
348             }
349             rel2 {
350                relative: 0.0 1.0;
351                to: "search_textfield";
352             }
353          }
354       }
355       part { name: "left2";
356          type: RECT;
357          scale: 1;
358          ignore_flags: ON_HOLD;
359          description { state: "default" 0.0;
360             visible: 0;
361             min: EDITFIELD_SEARCHBAR_LEFT2_INC 0;
362             fixed: 1 1;
363             align: 0 0;
364             rel1 {
365                relative: 0.0 0.0;
366                to: "search_textfield";
367             }
368             rel2 {
369                relative: 0.0 1.0;
370                to: "search_textfield";
371             }
372          }
373       }
374       part { name: "right1";
375          type: RECT;
376          scale: 1;
377          ignore_flags: ON_HOLD;
378          description { state: "default" 0.0;
379             visible: 0;
380             min: EDITFIELD_SEARCHBAR_RIGHT1_ERASER_SHOW_INC 0;
381             fixed: 1 1;
382             align: 1 0;
383             rel1 {
384                relative: 1.0 0.0;
385                to: "search_textfield";
386             }
387             rel2.to: "search_textfield";
388          }
389       }
390       part { name: "right2";
391          type: RECT;
392          scale: 1;
393          ignore_flags: ON_HOLD;
394          description { state: "default" 0.0;
395             visible: 0;
396             min: EDITFIELD_SEARCHBAR_RIGHT2_INC 0;
397             fixed: 1 1;
398             align: 1 0;
399             rel1 {
400                relative: 1.0 0.0;
401                to: "search_textfield";
402             }
403             rel2.to: "search_textfield";
404          }
405       }
406       part { name: "bottom1";
407          type: RECT;
408          scale: 1;
409          ignore_flags: ON_HOLD;
410          description { state: "default" 0.0;
411             visible: 0;
412             min: 0 EDITFIELD_SEARCHBAR_BOTTOM1_SINGLE_INC;
413             fixed: 1 1;
414             align: 0 1;
415             rel1 {
416                relative: 0.0 1.0;
417                to: "search_textfield";
418             }
419             rel2.to: "search_textfield";
420          }
421          description { state: "elm.text.show" 0.0;
422             inherit: "default" 0.0;
423             min: 0 EDITFIELD_SEARCHBAR_BOTTOM1_MULTI_INC;
424          }
425       }
426       part { name: "bottom2";
427          type: RECT;
428          scale: 1;
429          ignore_flags: ON_HOLD;
430          description { state: "default" 0.0;
431             visible: 0;
432             min: 0 EDITFIELD_SEARCHBAR_BOTTOM2_SINGLE_INC;
433             fixed: 0 1;
434             rel1 {
435                relative: 0.0 1.0;
436                to: "search_textfield";
437             }
438             rel2.to: "search_textfield";
439             align: 0 1;
440          }
441          description { state: "elm.text.show" 0.0;
442             inherit: "default" 0.0;
443             min: 0 EDITFIELD_SEARCHBAR_BOTTOM2_MULTI_INC;
444          }
445       }
446       part { name: "bottom3";
447          type: RECT;
448          scale: 1;
449          ignore_flags: ON_HOLD;
450          description { state: "default" 0.0;
451             visible: 0;
452             min: 0 EDITFIELD_SEARCHBAR_BOTTOM3_SINGLE_INC;
453             fixed: 0 1;
454             rel1 {
455                relative: 0.0 1.0;
456                to: "search_textfield";
457             }
458             rel2.to: "search_textfield";
459             align: 0 1;
460          }
461          description { state: "elm.text.show" 0.0;
462             inherit: "default" 0.0;
463             min: 0 EDITFIELD_SEARCHBAR_BOTTOM3_MULTI_INC;
464          }
465       }
466       part { name: "elm.text";
467          type: TEXT;
468          scale: 1;
469          ignore_flags: ON_HOLD;
470          description { state: "default" 0.0;
471             visible: 0;
472             align: 0.0 0.0;
473             min: 0 34;
474             fixed: 1 1;
475             rel1 {
476                relative: 1.0 1.0;
477                to_x: "left2";
478                to_y: "top2";
479             }
480             rel2 {
481                relative: 1.0 1.0;
482                to_x: "left2";
483                to_y: "top2";
484             }
485             color: EDITFIELD_TITLE_COLOR_INC;
486             text {
487                font: "SLP:style=Medium";
488                size: EDITFIELD_TITLE_SIZE_INC;
489                min: 1 1;
490                align: 0.0 0.0;
491                text_class: "slp";
492             }
493          }
494          description { state: "elm.text.show" 0.0;
495             inherit: "default" 0.0;
496             visible: 1;
497          }
498       }
499       part { name: "elm.guidetext";
500          type: TEXT;
501          scale: 1;
502          ignore_flags: ON_HOLD;
503          description { state: "default" 0.0;
504             align: 0.0 0.0;
505             fixed: 1 1;
506             rel1.to: "elm.swallow.content";
507             rel2.to: "elm.swallow.content";
508             color: EDITFIELD_GUIDE_TEXT_COLOR_INC;
509             text {
510                font: "SLP:style=Roman";
511                size: ENTRY_TEXT_SIZE_INC;
512                min: 0 0;
513                align: 0.0 0.5;
514                text_class: "slp";
515             }
516          }
517          description { state: "hidden" 0.0;
518             inherit: "default" 0.0;
519             visible: 0;
520          }
521       }
522       part {
523          name: "elm.swallow.content";
524          type: SWALLOW;
525          scale: 1;
526          ignore_flags: ON_HOLD;
527          description { state: "default" 0.0;
528             min: 0 40;
529             rel1 {
530                relative : 1.0 1.0;
531                to_x: "left1";
532                to_y: "top1";
533             }
534             rel2 {
535                relative : 0.0 0.0;
536                to_x: "right1";
537                to_y: "bottom1";
538             }
539             align: 0.0 0.5;
540          }
541       }
542       part { name: "eraser_image";
543          scale: 1;
544          description { state: "default" 0.0;
545             visible: 0;
546             min: EDITFIELD_SEARCHBAR_ERASER_MINW_INC EDITFIELD_SEARCHBAR_ERASER_MINH_INC;
547             fixed: 1 1;
548             align: 1 0.5;
549             rel1 {
550                relative: 0.0 0.5;
551                to_x : "right2";
552             }
553             rel2 {
554                relative: 0.0 0.5;
555                to_x : "right2";
556             }
557          }
558          description { state: "elm.eraser.show" 0.0;
559             inherit: "default" 0.0;
560             visible: 1;
561             image {
562                normal: GALLERY_EDC_IMAGE_EDITFIELD_CLEAR;
563                border: 10 10 10 10;
564                border_scale: 1;
565             }
566          }
567          description {
568             state: "elm.eraser.pressed" 0.0;
569             inherit: "default" 0.0;
570             visible: 1;
571             image {
572                normal: GALLERY_EDC_IMAGE_EDITFIELD_CLEAR_PRESS;
573                border: 8 8 8 8;
574                border_scale: 1;
575             }
576          }
577       }
578       part { name: "eraser";
579          type: RECT;
580          scale: 1;
581          mouse_events: 1;
582          description { state: "default" 0.0;
583             visible: 0;
584             min: EDITFIELD_SEARCHBAR_ERASER_EVENT_MINW_INC EDITFIELD_SEARCHBAR_ERASER_EVENT_MINH_INC;
585             fixed: 1 1;
586             align: 1 0.5;
587             color: 0 0 0 0;
588             rel1 {
589                relative: 0.0 0.5;
590                to_x : "right2";
591             }
592             rel2 {
593                relative: 0.0 0.5;
594                to_x : "right2";
595             }
596          }
597          description { state: "elm.eraser.show" 0.0;
598             inherit: "default" 0.0;
599             visible: 1;
600          }
601       }
602    }
603    programs {
604       program {
605          name: "guidetext_show";
606          signal: "elm,state,guidetext,show";
607          source: "elm";
608          action: STATE_SET "default" 0.0;
609          target: "elm.guidetext";
610       }
611       program {
612          name: "guidetext_hide";
613          signal: "elm,state,guidetext,hide";
614          source: "elm";
615          action: STATE_SET "hidden" 0.0;
616          target: "elm.guidetext";
617       }
618       program {
619          name: "eraser_show";
620          signal: "elm,state,eraser,show";
621          source: "elm";
622          action: STATE_SET "elm.eraser.show" 0.0;
623          target: "eraser_image";
624          target: "eraser";
625       }
626       program {
627          name: "eraser_hide";
628          signal: "elm,state,eraser,hide";
629          source: "elm";
630          action: STATE_SET "default" 0.0;
631          target: "eraser_image";
632          target: "eraser";
633       }
634       program {
635          name: "label_show";
636          signal: "elm,state,title,show";
637          source: "elm";
638          action: STATE_SET "elm.text.show" 0.0;
639          target: "elm.text";
640          target: "top1";
641          target: "bottom1";
642          target: "bottom2";
643          target: "bottom3";
644       }
645       program {
646          name: "label_hide";
647          signal: "elm,state,title,hide";
648          source: "elm";
649          action: STATE_SET "default" 0.0;
650          target: "elm.text";
651          target: "top1";
652          target: "bottom1";
653          target: "bottom2";
654          target: "bottom3";
655       }
656      program {
657          name: "eraser_clicked";
658          signal: "mouse,clicked,1";
659          source: "eraser";
660          action: SIGNAL_EMIT "elm,eraser,clicked" "elm";
661       }
662      program {
663          name: "bg_clicked";
664          signal: "mouse,clicked,1";
665          source: "search_textfield";
666          action: SIGNAL_EMIT "elm,bg,clicked" "elm";
667       }
668       program { name: "cancel_in";
669          signal: "cancel,in";
670          source: "";
671          action: STATE_SET "in" 0.0;
672          target: "button_cancel";
673          target: "inputfield_rect";
674          transition: ACCELERATE 0.4;
675       }
676       program { name: "cancel_out";
677          signal: "cancel,out";
678          source: "";
679          action: STATE_SET "default" 0.0;
680          target: "button_cancel";
681          target: "inputfield_rect";
682          transition: ACCELERATE 0.4;
683       }
684       program { name: "cancel_show";
685          signal: "cancel,show";
686          source: "";
687          action: STATE_SET "in" 0.0;
688          target: "button_cancel";
689          target: "inputfield_rect";
690       }
691       program { name: "cancel_hide";
692          signal: "cancel,hide";
693          source: "";
694          action: STATE_SET "default" 0.0;
695          target: "button_cancel";
696          target: "inputfield_rect";
697       }
698       program {
699          name: "eraser_pressed";
700          signal: "mouse,down,1";
701          source: "eraser";
702          action: STATE_SET "elm.eraser.pressed" 0.0;
703          target: "eraser_image";
704       }
705       program {
706          name: "eraser_unpressed";
707          signal: "mouse,up,1";
708          source: "eraser";
709          action: STATE_SET "elm.eraser.show" 0.0;
710          target: "eraser_image";
711       }
712    }
713 }
714