Merge "Fix issue that the most visited item can't be selected." into 2.0_beta
[profile/ivi/org.tizen.browser.git] / edc / browser-predictive-history.edc
1 /*
2  * Copyright 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://www.tizenopensource.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 #include "browser-macro.edc"
19
20 collections {
21         group {
22                 name: "browser/predictive-history";
23                 parts {
24                         part { name: "bg";
25                                 mouse_events: 0;
26                                 type: RECT;
27                                 scale: 1;
28                                 description {
29                                         state: "default" 0.0;
30                                         visible: 1;
31                                         fixed: 1 0;
32                                         align: 0.0 0.0;
33                                         rel1 { relative: 0.0 0.0; }
34                                         rel2 { relative: 1.0 1.0; }
35                                         color: 0 0 0 255;
36                                 }
37                         }
38                         part { name: "elm.swallow.predictive_history_genlist";
39                                 mouse_events: 1;
40                                 type: SWALLOW;
41                                 scale: 1;
42                                 description {
43                                         state: "default" 0.0;
44                                         visible: 1;
45                                         fixed: 1 0;
46                                         align: 0.0 0.0;
47                                         rel1 { relative: 0.0 0.0; }
48                                         rel2 { relative: 1.0 1.0; }
49                                 }
50                         }
51                 }
52         }
53
54
55 #define GENLIST_PART_TEXT_SELECTED_COLOR_INC 255 255 255 255
56
57 #define BEAT_GENLIST_PART_BASE( param_item_height ) \
58          part { name: "base"; \
59             type: RECT; \
60             repeat_events: 1; \
61             scale: 1; \
62             description { state: "default" 0.0; \
63                min: 0 param_item_height; \
64                color: 0 0 0 255; \
65             } \
66          }
67 #define BEAT_GENLIST_PART_BG_IMAGE \
68          part { name: "bg_image"; \
69             type: RECT; \
70             clip_to: "disclip"; \
71             mouse_events: 0; \
72             description { state: "default" 0.0; \
73                visible: 0; \
74                color: GENLIST_PART_BG_SELECTED_COLOR_INC; \
75             } \
76             description { state: "selected" 0.0; \
77                inherit: "default" 0.0; \
78                visible: 1; \
79             } \
80          }
81 #define BEAT_GENLIST_PART_BOTTOM_LINE \
82          part { name: "bottom_line"; \
83             type: RECT; \
84             clip_to: "disclip"; \
85             mouse_events: 0; \
86             description { state: "default" 0.0; \
87                min: 0 1; \
88                fixed: 0 1; \
89                visible: 1; \
90                color: 80 80 80 255; \
91                rel1 { \
92                   relative: 0.0 1.0; \
93                   offset: 0 -1; \
94                } \
95             } \
96          }
97 #define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \
98          part { name: "elm.padding.left"; \
99             type: RECT; \
100             scale: 1; \
101             description { state: "default" 0.0; \
102                min: param_padding_size 0; \
103                fixed: 1 0; \
104                visible: 0; \
105                rel2.relative: 0.0 1.0; \
106                align: 0.0 0.0; \
107             } \
108          }
109 #define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
110        part { name: "elm.padding.right"; \
111             type: RECT; \
112             scale: 1; \
113             description { state: "default" 0.0; \
114                min: param_padding_size 0; \
115                fixed: 1 0; \
116                visible: 0; \
117                rel1.relative: 1.0  0.0; \
118                align: 1.0 0.0; \
119             } \
120          }
121
122         group { name: "elm/genlist/item/browser/1text/default";
123       alias: "elm/genlist/item_odd/browser/1text/default";
124       alias: "elm/genlist/item/browser/1line_textonly/default";
125       alias: "elm/genlist/item_odd/browser/1line_textonly/default";
126       alias: "elm/genlist/item_compress/browser/1line_textonly/default";
127       alias: "elm/genlist/item_compress_odd/browser/1line_textonly/default";
128
129       data.item: "stacking" "above";
130       data.item: "selectraise" "on";
131       data.item: "texts" "elm.text";
132       styles {
133          style { name: "text_style";
134             base: "font=SLP:style=Roman font_size=40 color=#F9F9F9 wrap=char ellipsis=1.0";
135             tag:  "br" "\n";
136             tag:  "ps" "ps";
137             tag:  "tab" "\t";
138             tag:  "b" "+ font=SLP:style=Bold";
139             tag:  "match" "+ color=#008CD2FF";
140         }
141      }
142       parts {
143                  BEAT_GENLIST_PART_BASE( 90 )
144          BEAT_GENLIST_PART_BG_IMAGE
145          BEAT_GENLIST_PART_BOTTOM_LINE
146          BEAT_GENLIST_PART_PADDING_LEFT( 15 )
147          BEAT_GENLIST_PART_PADDING_RIGHT( 15 )
148          part { name: "elm.text";
149             clip_to: "disclip";
150                         type: TEXTBLOCK;
151             mouse_events: 0;
152             scale: 1;
153             description { state: "default" 0.0;
154                fixed: 1 0;
155                rel1 {
156                   relative: 1.0  0.2;
157                   offset: 0 0;
158                   to_x: "elm.padding.left";
159                   to_y: "base";
160                }
161                rel2 {
162                   relative: 0.0  1.0;
163                   offset:   0   0;
164                   to_x: "elm.padding.right";
165                   to_y: "base";
166                }
167                text {
168                         style: "text_style";
169                }
170             }
171             description { state: "selected" 0.0;
172                inherit: "default" 0.0;
173                color: GENLIST_PART_TEXT_SELECTED_COLOR_INC;
174             }
175          }
176          BEAT_GENLIST_PART_DISCLIP
177       }
178       programs {
179          // signal: elm,state,%s,active
180          //   a "check" item named %s went active
181          // signal: elm,state,%s,passive
182          //   a "check" item named %s went passive
183          // default is passive
184          program { name: "go_active";
185             signal: "elm,state,selected";
186             source: "elm";
187             action: STATE_SET "selected" 0.0;
188             target: "bg_image";
189             target: "elm.text";
190          }
191          program { name: "go_passive";
192             signal: "elm,state,unselected";
193             source: "elm";
194             action: STATE_SET "default" 0.0;
195             target: "bg_image";
196             target: "elm.text";
197             transition: LINEAR 0.1;
198          }
199          program { name: "go_disabled";
200             signal: "elm,state,disabled";
201             source: "elm";
202             action: STATE_SET "disabled" 0.0;
203             target: "disclip";
204          }
205          program { name: "go_enabled";
206             signal: "elm,state,enabled";
207             source: "elm";
208             action: STATE_SET "default" 0.0;
209             target: "disclip";
210          }
211       }
212    }
213
214    group { name: "elm/genlist/item/browser/1text.1icon/default";
215       alias: "elm/genlist/item_odd/browser/1text.1icon/default";
216       alias: "elm/genlist/item_compress/browser/1text.1icon/default";
217       alias: "elm/genlist/item_compress_odd/browser/1text.1icon/default";
218       data.item: "stacking" "above";
219       data.item: "selectraise" "on";
220       data.item: "texts" "elm.text";
221       data.item: "contents" "elm.icon";
222       data.item: "renames" "elm.edit.rename";
223
224       parts {
225          BEAT_GENLIST_PART_BASE( 90 )
226          BEAT_GENLIST_PART_BG_IMAGE
227          BEAT_GENLIST_PART_BOTTOM_LINE
228          BEAT_GENLIST_PART_PADDING_LEFT( 15 )
229          BEAT_GENLIST_PART_PADDING_RIGHT( 15 )
230          part { name: "elm.icon";
231             clip_to: "disclip";
232             type: SWALLOW;
233             scale: 1;
234             description { state: "default" 0.0;
235                fixed: 1 1;
236                min: 60 60;
237                max: 60 60;
238                rel1.to_x: "elm.padding.left";
239                rel1.offset: 10 0;
240                rel2 {
241                   relative: 0.0 1.0;
242                   to_x: "elm.padding.left";
243                }
244                align: 0.0 0.5;
245             }
246          }
247          part { name: "elm.padding.icon.left";
248             clip_to: "disclip";
249             type: RECT;
250             scale: 1;
251             description { state: "default" 0.0;
252                min: 10 0;
253                fixed: 1 0;
254                rel1.to_x: "elm.icon";
255                rel2 {
256                   relative: 0.0 1.0;
257                   to_x: "elm.icon";
258                }
259                align: 1.0 0.0;
260                visible: 0;
261             }
262          }
263
264          part { name: "elm.text";
265             clip_to: "disclip";
266                         type: TEXTBLOCK;
267             mouse_events: 0;
268             scale: 1;
269             description { state: "default" 0.0;
270                fixed: 1 0;
271                rel1 {
272                   relative: 1.0  0.0;
273                   offset: 0 0;
274                   to_x: "elm.icon";
275                   to_y: "base";
276                }
277                rel2 {
278                   relative: 0.0  1.0;
279                   offset:   0   0;
280                   to_x: "elm.padding.right";
281                   to_y: "base";
282                }
283                text {
284                         style: "text_style";
285                }
286             }
287             description { state: "selected" 0.0;
288                inherit: "default" 0.0;
289                color: GENLIST_PART_TEXT_SELECTED_COLOR_INC;
290             }
291          }
292          BEAT_GENLIST_PART_DISCLIP
293       }
294       programs {
295          program { name: "go_active";
296             signal: "elm,state,selected";
297             source: "elm";
298             action: STATE_SET "selected" 0.0;
299             target: "bg_image";
300             target: "elm.text";
301          }
302          program { name: "go_passive";
303             signal: "elm,state,unselected";
304             source: "elm";
305             action: STATE_SET "default" 0.0;
306             target: "bg_image";
307             target: "elm.text";
308             transition: LINEAR 0.1;
309          }
310          program { name: "go_disabled";
311             signal: "elm,state,disabled";
312             source: "elm";
313             action: STATE_SET "disabled" 0.0;
314             target: "disclip";
315          }
316          program { name: "go_enabled";
317             signal: "elm,state,enabled";
318             source: "elm";
319             action: STATE_SET "default" 0.0;
320             target: "disclip";
321          }
322       }
323    }
324
325    group { name: "elm/genlist/item/browser/1text.1icon.2/default";
326       alias: "elm/genlist/item_odd/browser/1text.1icon.2/default";
327       alias: "elm/genlist/item_compress/browser/1text.1icon.2/default";
328       alias: "elm/genlist/item_compress_odd/browser/1text.1icon.2/default";
329       data.item: "stacking" "above";
330       data.item: "selectraise" "on";
331       data.item: "texts" "elm.text";
332       data.item: "contents" "elm.icon";
333       data.item: "renames" "elm.edit.rename";
334
335       parts {
336                  BEAT_GENLIST_PART_BASE( 90 )
337          BEAT_GENLIST_PART_BG_IMAGE
338          BEAT_GENLIST_PART_BOTTOM_LINE
339          BEAT_GENLIST_PART_PADDING_LEFT( 15 )
340          BEAT_GENLIST_PART_PADDING_RIGHT( 15 )
341          part { name: "elm.icon";
342             clip_to: "disclip";
343             type: SWALLOW;
344             scale: 1;
345             description { state: "default" 0.0;
346                fixed: 1 1;
347                min: 40 40;
348                max: 40 40;
349                rel1.to_x: "elm.padding.left";
350                rel1.offset: 10 0;
351                rel2 {
352                   relative: 0.0 1.0;
353                   to_x: "elm.padding.left";
354                }
355                align: 0.0 0.5;
356             }
357          }
358          part { name: "elm.padding.icon.left";
359             clip_to: "disclip";
360             type: RECT;
361             scale: 1;
362             description { state: "default" 0.0;
363                min: 10 0;
364                fixed: 1 0;
365                rel1.to_x: "elm.icon";
366                rel2 {
367                   relative: 0.0 1.0;
368                   to_x: "elm.icon";
369                }
370                align: 1.0 0.0;
371                visible: 0;
372             }
373          }
374          /* Customize, the globe icon is more smaller than search icon. */
375          part { name: "elm.padding.text.left";
376             clip_to: "disclip";
377             type: RECT;
378             scale: 1;
379             description { state: "default" 0.0;
380                min: 20 0;
381                fixed: 1 0;
382                align: 0.0 0.0;
383                rel1 { relative: 1.0 0.0; to: "elm.icon"; }
384                rel2 { relative: 1.0 0.0; to: "elm.icon"; }
385                visible: 0;
386             }
387          }
388          part { name: "elm.text";
389             clip_to: "disclip";
390                         type: TEXTBLOCK;
391             mouse_events: 0;
392             scale: 1;
393             description { state: "default" 0.0;
394                fixed: 1 0;
395                rel1 {
396                   relative: 1.0  0.0;
397                   offset: 0 0;
398                   /* Customize, the globe icon is more smaller than search icon. */
399                   to_x: "elm.padding.text.left";
400                   to_y: "base";
401                }
402                rel2 {
403                   relative: 0.0  1.0;
404                   offset:   0   0;
405                   to_x: "elm.padding.right";
406                   to_y: "base";
407                }
408                text {
409                         style: "text_style";
410                }
411             }
412             description { state: "selected" 0.0;
413                inherit: "default" 0.0;
414                color: GENLIST_PART_TEXT_SELECTED_COLOR_INC;
415             }
416          }
417          BEAT_GENLIST_PART_DISCLIP
418       }
419       programs {
420          program { name: "go_active";
421             signal: "elm,state,selected";
422             source: "elm";
423             action: STATE_SET "selected" 0.0;
424             target: "bg_image";
425             target: "elm.text";
426          }
427          program { name: "go_passive";
428             signal: "elm,state,unselected";
429             source: "elm";
430             action: STATE_SET "default" 0.0;
431             target: "bg_image";
432             target: "elm.text";
433             transition: LINEAR 0.1;
434          }
435          program { name: "go_disabled";
436             signal: "elm,state,disabled";
437             source: "elm";
438             action: STATE_SET "disabled" 0.0;
439             target: "disclip";
440          }
441          program { name: "go_enabled";
442             signal: "elm,state,enabled";
443             source: "elm";
444             action: STATE_SET "default" 0.0;
445             target: "disclip";
446          }
447       }
448    }
449 }