[Title] show appropriate zoom buttons when zoom level is changed
[profile/ivi/org.tizen.browser.git] / edc / browser-most-visited.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 BUTTON(most_visited_item, "browser-view-images/most-visited/I01_favicon_box.png",
22                 "browser-view-images/most-visited/41_browser_favicon_box_press.png", 4, 4, 4, 4);
23
24         group {
25                 name: "browser/most-visited";
26                 images {
27                         image: "browser-view-images/most-visited/I01_favicon_bg.png" COMP;
28                 }
29                 parts {
30                         part { name: "bg";
31                                 mouse_events: 0;
32                                 type: IMAGE;
33                                 scale: 1;
34                                 description {
35                                         state: "default" 0.0;
36                                         visible: 1;
37                                         min: 0 141;
38                                         fixed: 0 1;
39                                         align: 0.0 0.0;
40                                         rel1 { relative: 0.0 0.0; }
41                                         rel2 { relative: 1.0 1.0; }
42                                         image.normal: "browser-view-images/most-visited/I01_favicon_bg.png";
43                                         image.border: 1 1 1 5;
44                                 }
45                                 description {
46                                         state: "visible" 0.0;
47                                         inherit: "default" 0.0;
48                                 }
49                                 description {
50                                         state: "edit_mode_state" 0.0;
51                                         inherit: "default" 0.0;
52                                         min: 0 219;
53                                 }
54                                 description {
55                                         state: "landscape" 0.0;
56                                         inherit: "default" 0.0;
57                                         min: 0 96;
58                                 }
59                         }
60                         part {
61                                 name: "elm.text.most_visited_title";
62                                 type: TEXT;
63                                 scale: 1;
64                                 description {
65                                         state: "default" 0.0;
66                                         visible: 1;
67                                         min: 0 52;
68                                         fixed: 0 1;
69                                         align: 0.0 0.0;
70                                         rel1 { relative: 0.0 0.0; to: "bg"; }
71                                         rel2 { relative: 1.0 0.0; to: "bg"; }
72                                         color: 81 84 84 255;
73                                         text {
74                                                 font: FONT_MED;
75                                                 size: 30;
76                                                 align: 0.5 0.5;
77                                         }
78                                 }
79                                 description {
80                                         state: "visible" 0.0;
81                                         inherit: "default" 0.0;
82                                 }
83                                 description {
84                                         state: "landscape" 0.0;
85                                         inherit: "default" 0.0;
86                                         align: 0.5 0.0;
87                                         rel1 { relative: 0.0 0.0; to: "bg"; }
88                                         rel2 { relative: 0.0 1.0; to_x: "elm.swallow.most_visited"; to_y: "bg"; }
89                                 }
90                                 description {
91                                         state: "landscape_edit_mode_state" 0.0;
92                                         inherit: "default" 0.0;
93                                         align: 0.5 0.0;
94                                         rel1 { relative: 0.0 0.0; to: "bg"; }
95                                         rel2 { relative: 0.0 1.0; to_x: "elm.swallow.done"; to_y: "bg"; }
96                                 }
97                         }
98                         part {
99                                 name: "padding,item_box_right";  // padding
100                                 type: RECT;
101                                 mouse_events: 0;
102                                 scale: 1;
103                                 description {
104                                         state: "default" 0.0;
105                                         visible: 0;
106                                         min: 40 0;
107                                         fixed: 1 0;
108                                         align: 1.0 0.0;
109                                         rel1 { relative: 1.0 0.0; to: "bg"; }
110                                         rel2 { relative: 1.0 1.0; to: "bg"; }
111                                         color: 0 0 0 0;
112                                 }
113                         }
114                         part {
115                                 name: "padding,item_box_top";  // padding
116                                 type: RECT;
117                                 mouse_events: 0;
118                                 scale: 1;
119                                 description {
120                                         state: "default" 0.0;
121                                         visible: 0;
122                                         min: 0 10;
123                                         fixed: 0 1;
124                                         align: 0.0 0.0;
125                                         rel1 { relative: 0.0 0.0; to: "bg"; }
126                                         rel2 { relative: 1.0 0.0; to: "bg"; }
127                                         color: 0 0 0 0;
128                                 }
129                         }
130                         part {
131                                 name: "elm.swallow.most_visited";
132                                 type: SWALLOW;
133                                 mouse_events: 1;
134                                 scale: 1;
135                                 description {
136                                         state: "default" 0.0;
137                                         visible: 1;
138                                         align: 0.0 0.0;
139                                         rel1 { relative: 0.0 1.0; to: "elm.text.most_visited_title"; }
140                                         rel2 { relative: 1.0 1.0; to: "bg"; }
141                                 }
142                                 description {
143                                         state: "landscape" 0.0;
144                                         inherit: "default" 0.0;
145                                         visible: 1;
146                                         min: 690 0;
147                                         fixed: 1 0;
148                                         align: 1.0 0.0;
149                                         rel1 { relative: 0.0 1.0; to_x: "padding,item_box_right"; to_y: "padding,item_box_top"; }
150                                         rel2 { relative: 0.0 1.0; to_x: "padding,item_box_right"; to_y: "bg"; }
151                                 }
152                                 description {
153                                         state: "visible" 0.0;
154                                         inherit: "default" 0.0;
155                                         visible: 1;
156                                 }
157                         }
158                         part {
159                                 name: "padding,most_visited_guide_text_top";  // padding
160                                 type: RECT;
161                                 mouse_events: 0;
162                                 scale: 1;
163                                 description {
164                                         state: "default" 0.0;
165                                         visible: 0;
166                                         min: 0 15;
167                                         fixed: 0 1;
168                                         align: 0.0 1.0;
169                                         rel1 { relative: 0.0 0.0; to: "elm.swallow.most_visited"; }
170                                         rel2 { relative: 1.0 0.0; to: "elm.swallow.most_visited"; }
171                                         color: 0 0 0 0;
172                                 }
173                         }
174                         part {
175                                 name: "padding,most_visited_guide_text_bottom";  // padding
176                                 type: RECT;
177                                 mouse_events: 0;
178                                 scale: 1;
179                                 description {
180                                         state: "default" 0.0;
181                                         visible: 0;
182                                         min: 0 15;
183                                         fixed: 0 1;
184                                         align: 0.0 1.0;
185                                         rel1 { relative: 0.0 1.0; to: "elm.swallow.most_visited"; }
186                                         rel2 { relative: 1.0 1.0; to: "elm.swallow.most_visited"; }
187                                         color: 0 0 0 0;
188                                 }
189                         }
190                         part {
191                                 name: "padding,most_visited_guide_text_bg_bottom";  // padding
192                                 type: RECT;
193                                 mouse_events: 0;
194                                 scale: 1;
195                                 description {
196                                         state: "default" 0.0;
197                                         visible: 0;
198                                         min: 0 15;
199                                         fixed: 0 1;
200                                         align: 0.0 0.0;
201                                         rel1 { relative: 0.0 1.0; to: "elm.swallow.most_visited_guide_text"; }
202                                         rel2 { relative: 1.0 1.0; to: "elm.swallow.most_visited_guide_text"; }
203                                         color: 0 0 0 0;
204                                 }
205                         }
206                         part { name: "most_visited_guide_text_bg";
207                                 mouse_events: 0;
208                                 type: IMAGE;
209                                 scale: 1;
210                                 description {
211                                         state: "default" 0.0;
212                                         visible: 0;
213                                         align: 0.0 0.0;
214                                         rel1 { relative: 0.0 0.0; to: "elm.swallow.most_visited_guide_text"; }
215                                         rel2 { relative: 1.0 1.0; to: "padding,most_visited_guide_text_bg_bottom"; }
216                                         image.normal: "browser-view-images/most-visited/I01_favicon_bg.png";
217                                         image.border: 1 1 1 5;
218                                 }
219                                 description {
220                                         state: "visible" 0.0;
221                                         inherit: "default" 0.0;
222                                         visible: 1;
223                                 }
224                         }
225                         part {
226                                 name: "elm.swallow.most_visited_guide_text";
227                                 type: SWALLOW;
228                                 mouse_events: 0;
229                                 scale: 1;
230                                 description {
231                                         state: "default" 0.0;
232                                         visible: 0;
233                                         align: 0.0 0.0;
234                                         fixed: 1 1;
235                                         rel1 { relative: 0.0 0.0; to: "padding,most_visited_guide_text_top"; }
236                                         rel2 { relative: 1.0 1.0; to: "padding,most_visited_guide_text_bottom"; }
237                                 }
238                                 description {
239                                         state: "visible" 0.0;
240                                         inherit: "default" 0.0;
241                                         visible: 1;
242                                 }
243                         }
244                         part {
245                                 name: "padding,done_right";  // padding
246                                 type: RECT;
247                                 mouse_events: 0;
248                                 scale: 1;
249                                 description {
250                                         state: "default" 0.0;
251                                         visible: 0;
252                                         min: 15 0;
253                                         fixed: 1 0;
254                                         align: 1.0 0.0;
255                                         rel1 { relative: 1.0 0.0; to: "bg"; }
256                                         rel2 { relative: 1.0 1.0; to: "bg"; }
257                                         color: 0 0 0 0;
258                                 }
259                         }
260                         part {
261                                 name: "padding,done_bottom";  // padding
262                                 type: RECT;
263                                 mouse_events: 0;
264                                 scale: 1;
265                                 description {
266                                         state: "default" 0.0;
267                                         visible: 0;
268                                         min: 0 15;
269                                         fixed: 0 1;
270                                         align: 0.0 1.0;
271                                         rel1 { relative: 0.0 1.0; to: "bg"; }
272                                         rel2 { relative: 1.0 1.0; to: "bg"; }
273                                         color: 0 0 0 0;
274                                 }
275                         }
276                         part {
277                                 name: "padding,done_right_for_landscape";  // padding
278                                 type: RECT;
279                                 mouse_events: 0;
280                                 scale: 1;
281                                 description {
282                                         state: "default" 0.0;
283                                         visible: 0;
284                                         min: 40 0;
285                                         fixed: 1 0;
286                                         align: 1.0 0.0;
287                                         rel1 { relative: 0.0 0.0; to_x: "elm.swallow.most_visited"; }
288                                         rel2 { relative: 0.0 1.0; to_x: "elm.swallow.most_visited"; }
289                                         color: 0 0 0 0;
290                                 }
291                         }
292                         part {
293                                 name: "elm.swallow.done";
294                                 type: SWALLOW;
295                                 mouse_events: 1;
296                                 scale: 1;
297                                 description {
298                                         state: "default" 0.0;
299                                         visible: 0;
300                                         min: 135 63;
301                                         max: 135 63;
302                                         fixed: 1 1;
303                                         align: 1.0 1.0;
304                                         rel1 { relative: 0.0 0.0; to_x: "padding,done_right"; to_y: "padding,done_bottom"; }
305                                         rel2 { relative: 0.0 0.0; to_x: "padding,done_right"; to_y: "padding,done_bottom"; }
306                                 }
307                                 description {
308                                         state: "edit_mode_state" 0.0;
309                                         inherit: "default" 0.0;
310                                         visible: 1;
311                                 }
312                                 description {
313                                         state: "landscape_edit_mode_state" 0.0;
314                                         inherit: "default" 0.0;
315                                         visible: 1;
316                                         align: 1.0 0.4;
317                                         rel1 { relative: 0.0 0.0; to_x: "padding,done_right_for_landscape"; to_y: "bg"; }
318                                         rel2 { relative: 0.0 1.0; to_x: "padding,done_right_for_landscape"; to_y: "bg"; }
319                                 }
320                         }
321                 }
322
323                 programs {
324                         //////////////////////////////////////////////////////////////
325                         // most visited edit mode on/off (by longpress on each item)
326                         //////////////////////////////////////////////////////////////
327                         program { name: "most_visited,edit_mode";
328                                 signal: "most_visited,edit_mode,signal";
329                                 transition: LINEAR 0.2;
330                                 action: STATE_SET "edit_mode_state" 0.0;
331                                 target: "bg";
332                                 after: "show,done_button";
333                         }
334                         program { name: "most_visited,normal_mode";
335                                 transition: LINEAR 0.2;
336                                 action: STATE_SET "default" 0.0;
337                                 target: "bg";
338                         }
339                         program { name: "most_visited,landscape_edit_mode";
340                                 signal: "most_visited,landscape_edit_mode,signal";
341                                 action: STATE_SET "landscape_edit_mode_state" 0.0;
342                                 target: "elm.swallow.done";
343                                 target: "elm.text.most_visited_title";
344                         }
345                         program { name: "most_visited,landscape_normal_mode";
346                                 signal: "most_visited,landscape_normal_mode,signal";
347                                 action: STATE_SET "landscape" 0.0;
348                                 target: "elm.swallow.done";
349                                 target: "elm.text.most_visited_title";
350                         }
351
352                         //////////////////////////////////////////////////////////////
353                         // portrait / landscape mode
354                         //////////////////////////////////////////////////////////////
355                         program { name: "most_visited,portrait";
356                                 signal: "most_visited,portrait,signal";
357                                 action: STATE_SET "default" 0.0;
358                                 target: "bg";
359                                 target: "elm.swallow.most_visited";
360                                 target: "elm.text.most_visited_title";
361                         }
362                         program { name: "most_visited,landscape";
363                                 signal: "most_visited,landscape,signal";
364                                 action: STATE_SET "landscape" 0.0;
365                                 target: "bg";
366                                 target: "elm.swallow.most_visited";
367                                 target: "elm.text.most_visited_title";
368                         }
369
370                         //////////////////////////////////////////////////////////////
371                         // show / hide done button
372                         //////////////////////////////////////////////////////////////
373                         program { name: "show,done_button";
374                                 action: STATE_SET "edit_mode_state" 0.0;
375                                 target: "elm.swallow.done";
376                         }
377                         program { name: "hide,done_button";
378                                 signal: "most_visited,normal_mode,signal";
379                                 action: STATE_SET "default" 0.0;
380                                 target: "elm.swallow.done";
381                                 after: "most_visited,normal_mode";
382                         }
383
384                         //////////////////////////////////////////////////////////////
385                         // show / hide most visited guide text
386                         //////////////////////////////////////////////////////////////
387                         program { name: "show,guide_text";
388                                 signal: "show,guide_text,signal";
389                                 action: STATE_SET "visible" 0.0;
390                                 target: "bg";
391                                 target: "elm.swallow.most_visited";
392                                 target: "elm.text.most_visited_title";
393                                 target: "elm.swallow.most_visited_guide_text";
394                                 target: "most_visited_guide_text_bg";
395                         }
396                         program { name: "hide,guide_text";
397                                 signal: "hide,guide_text,signal";
398                                 action: STATE_SET "default" 0.0;
399                                 target: "elm.swallow.most_visited_guide_text";
400                                 target: "most_visited_guide_text_bg";
401                         }
402                 }
403         }
404
405         group {
406                 name: "browser/most-visited-item";
407                 images {
408                         image: "browser-view-images/most-visited/I01_Btn_delete.png" COMP;
409                 }
410                 parts {
411                         part { name: "bg";
412                                 mouse_events: 0;
413                                 type: RECT;
414                                 scale: 1;
415                                 description {
416                                         state: "default" 0.0;
417                                         visible: 1;
418                                         min: 210 69;
419                                         max: 210 69;
420                                         fixed: 1 1;
421                                         align: 0.5 0.0;
422                                         rel1 { relative: 0.0 0.0; }
423                                         rel2 { relative: 1.0 1.0; }
424                                         color: 0 0 0 0;
425                                 }
426                         }
427                         part {
428                                 name: "elm.swallow.button";
429                                 type: SWALLOW;
430                                 scale: 1;
431                                 mouse_events: 1;
432                                 description {
433                                         state: "default" 0.0;
434                                         visible: 1;
435                                         min: 210 69;
436                                         max: 210 69;
437                                         fixed: 1 1;
438                                         align: 0.5 0.0;
439                                         rel1 {relative: 0.0 0.0; }
440                                         rel2 {relative: 1.0 1.0; }
441                                 }
442                         }
443                         PADDING("padding.favicon.top", 0, 19, 0, 1, 0.5, 0.0,
444                                         0.0, 0.0, 1.0, 0.0, bg, bg)
445                         PADDING("padding.favicon.left", 15, 0, 1, 0, 0.0, 0.5,
446                                         0.0, 0.0, 0.0, 1.0, bg, bg)
447                         PADDING("padding.favicon.right", 7, 0, 1, 0, 0.0, 0.5,
448                                         1.0, 0.0, 1.0, 1.0, elm.swallow.favicon, elm.swallow.favicon)
449
450                         part { name: "elm.swallow.favicon";
451                                 type: SWALLOW;
452                                 mouse_events: 0;
453                                 repeat_events: 1;
454                                 scale: 1;
455                                 description {
456                                         state: "default" 0.0;
457                                         visible: 1;
458                                         min: 30 30;
459                                         max: 30 30;
460                                         fixed: 1 1;
461                                         align: 0.0 0.0;
462                                         rel1 { relative: 1.0 1.0; to_x: padding.favicon.left; to_y: padding.favicon.top; }
463                                         rel2 { relative: 1.0 1.0; to_x: padding.favicon.left; to_y: padding.favicon.top; }
464                                         color: 255 255 255 255;
465                                 }
466                         }
467                         part { name: "name";
468                                 type: TEXT;
469                                 mouse_events: 0;
470                                 repeat_events: 1;
471                                 scale: 1;
472                                 description {
473                                         state: "default" 0.0;
474                                         visible: 1;
475                                         min: 150 30;
476                                         max: 150 30;
477                                         fixed: 1 1;
478                                         align: 0.0 0.0;
479                                         rel1 { relative: 1.0 1.0; to_x: padding.favicon.right; to_y: padding.favicon.top; }
480                                         rel2 { relative: 1.0 1.0; to_x: padding.favicon.right; to_y: padding.favicon.top; }
481                                         color: 78 73 69 255;
482                                         text {
483                                                 font: FONT_ROM;
484                                                 size: 27;
485                                                 align: 0.0 0.5;
486                                         }
487                                 }
488                         }
489                         part { name: "delete_icon";
490                                 type: IMAGE;
491                                 mouse_events: 1;
492                                 repeat_events: 0;
493                                 scale: 1;
494                                 description {
495                                         state: "default" 0.0;
496                                         visible: 0;
497                                         min: 36 34;
498                                         max: 36 34;
499                                         fixed: 1 1;
500                                         align: 0.8 0.2;
501                                         rel1 { relative: 1.0 0.0; to: elm.swallow.button; }
502                                         rel2 { relative: 1.0 0.0; to: elm.swallow.button; }
503                                         image.normal: "browser-view-images/most-visited/I01_Btn_delete.png";
504                                 }
505                                 description {
506                                         state: "visible" 0.0;
507                                         inherit: "default" 0.0;
508                                         visible: 1;
509                                 }
510                         }
511                 }
512                 programs {
513                         program { name: "most_visited,edit_mode";
514                                 signal: "most_visited,edit_mode,signal";
515                                 action: STATE_SET "visible" 0.0;
516                                 target: "delete_icon";
517                         }
518                         program { name: "most_visited,normal_mode";
519                                 signal: "most_visited,normal_mode,signal";
520                                 action: STATE_SET "default" 0.0;
521                                 target: "delete_icon";
522                         }
523                 }
524         }
525 }