[Genlist] Change button and group image by GUI 1.0
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / genlist / genlist_decorate.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18
19
20 /*
21  * vim:ts=3
22  */
23
24 // 2.2.7.1 edit mode select all style
25    group { GENLIST_NAME("select_all/default")
26       alias: "elm/layout/select_all/default";
27
28       GENLIST_PROLOG
29
30       data.item: "texts" "elm.text";
31       data.item: "contents" "elm.icon";
32
33       parts {
34          part { name: "bg";
35             type: RECT;
36             description { state: "default" 0.0;
37               color: GENLIST_SELECT_ALL_BG_COLOR;
38             }
39          }
40          GENLIST_PART_BASE
41          GENLIST_PART_PADDING_LEFT
42          GENLIST_PART_PADDING_RIGHT
43          GENLIST_PART_PADDING_TOP_SIZE( 1 )    // (82-80)/2
44          GENLIST_PART_PADDING_BOTTOM_SIZE( 1 ) // (82-80)/2
45          GENLIST_PART_ICON_CHECK_RADIO_L("elm.icon", "elm.padding.left")
46          GENLIST_PART_PADDING_L("elm.padding.icon.right", "elm.icon")
47          GENLIST_PART_LISTITEM_("elm.text", 80,
48             "elm.padding.icon.right", "elm.padding.right", "elm.padding.top", "elm.padding.bottom",
49          )
50          GENLIST_PART_FOCUS
51       }
52       programs {
53          GENLIST_PROGRAM_SOUND("elm.text")
54          GENLIST_PROGRAM_DISABLED( target: "elm.icon"; target: "elm.text"; )
55          GENLIST_PROGRAM_SOUND("bg")
56          GENLIST_PROGRAM_FOCUS
57       }
58    }
59
60 // 2.2.7. Genlist Edit mode (rename)
61 // Should be used as decorate all item style
62    group { GENLIST_NAME("edit_default/default")
63
64       GENLIST_PROLOG_NORMAL
65
66       data.item: "contents" "elm.edit.icon.1 elm.edit.icon.2";
67
68       parts {
69          GENLIST_PART_BASE
70          GENLIST_PART_BG_NORMAL
71          GENLIST_PART_EXPANDED_PAD
72          GENLIST_PART_SPACER("elm.padding.left",
73             GENLIST_DESCRIPTION_L("elm.swallow.pad",
74                min: GENLIST_PADDING_SIZE_LEFT 0;
75                max: GENLIST_PADDING_SIZE_LEFT -1;
76                fixed: 1 0;
77             )
78             description { state: "reorder" 0.0;
79                inherit: "default" 0.0;
80                min: DIALOGUE_PADDING_SIZE_LEFT 0;
81                max: DIALOGUE_PADDING_SIZE_LEFT -1;
82             }
83          )
84          GENLIST_PART_SPACER("elm.padding.right",
85             description { state: "default" 0.0;
86                min: GENLIST_PADDING_SIZE_RIGHT 0;
87                max: GENLIST_PADDING_SIZE_RIGHT -1;
88                fixed: 1 0;
89                align: 1.0 0.5;
90                rel1.to: "base";
91                rel2.to: "base";
92                rel1.relative: 1 0;
93             }
94             description { state: "reorder" 0.0;
95                inherit: "default" 0.0;
96                min: DIALOGUE_PADDING_SIZE_RIGHT 0;
97                max: DIALOGUE_PADDING_SIZE_RIGHT -1;
98             }
99          )
100          GENLIST_PART_ICON("elm.edit.icon.1",
101             GENLIST_DESCRIPTION_L("elm.padding.left",
102                align: 1 0.5;
103                GENLIST_PARAM_ICON_CHECK_RADIO
104             )
105             description { state: "decorate" 0.0;
106                inherit: "default" 0.0;
107                align: 0 0.5;
108             }
109             description { state: "flipped" 0.0;
110                inherit: "default" 0.0;
111                rel1.relative: 0 0;
112                rel2.relative: 0 1;
113                align: 1 0.5;
114             }
115          )
116          GENLIST_PART_PADDING_L("elm.edit.icon1.right", "elm.edit.icon.1")
117          GENLIST_PART_ICON("elm.swallow.decorate.content",
118             GENLIST_DESCRIPTION_LR("elm.edit.icon1.right", "elm.edit.icon.2",
119                min: 0 GENLIST_HEIGHT_1LINE;
120             )
121          )
122          GENLIST_PART_BOTTOM_LINE
123          GENLIST_PART_ICON("elm.edit.icon.2",
124             GENLIST_DESCRIPTION_R("elm.padding.right",
125               align: 0 0.5;
126               max: 48 48;
127             )
128             description { state: "decorate" 0.0;
129                inherit: "default" 0.0;
130                align: 1 0.5;
131             }
132             description { state: "flipped" 0.0;
133                inherit: "default" 0.0;
134                rel1.relative: 1 0;
135                rel2.relative: 1 1;
136                align: 0 0.5;
137             }
138          )
139          GENLIST_PART_FOCUS_NORMAL
140       }
141       programs {
142          GENLIST_PROGRAM_DISABLED(
143             target: "bg";
144             target: "bg_reorder";
145             target: "bottom_line";
146             target: "bottom_line2";
147          )
148          GENLIST_PROGRAM_SELECT(
149             target: "bg";
150             target: "bg_reorder";
151             target: "bottom_line";
152             target: "bottom_line2";
153          )
154          // BG of swallowed VIEW(it) is visible 0
155          GENLIST_PROGRAM_SOUND("bg")
156          GENLIST_PROGRAM_REORDER_SOUND("bg_reorder")
157          GENLIST_PROGRAM_REORDER(
158            target: "bg_clip";
159            target: "bg_reorder_clip";
160            target: "bottom_line_clip";
161            target: "elm.padding.left";
162            target: "elm.padding.right";
163          )
164          GENLIST_PROGRAMS_DECORATE_EFFECT(
165             target: "elm.edit.icon.1";
166             target: "elm.edit.icon.2";
167          )
168          GENLIST_PROGRAM_FLIP_EFFECT_TARGET(
169             target: "elm.edit.icon.1";
170             target: "elm.edit.icon.2";
171          )
172          program { name: "flip_enabled";
173             signal:  "elm,state,flip,enabled";
174             source:  "elm";
175             script {
176                new st[31];
177                new Float:vl;
178                get_state(PART:"bg_reorder_clip", st, 30, vl);
179                if (!strcmp(st, "reorder") || !strcmp(st, "reorder_flip")) {
180                   set_state(PART:"bg_reorder_clip", "reorder_flip", 0.0);
181                 }
182             }
183          }
184          program { name: "flip_disabled";
185             signal:  "elm,state,flip,disabled";
186             source:  "elm";
187             script {
188                new st[31];
189                new Float:vl;
190                get_state(PART:"bg_reorder_clip", st, 30, vl);
191                if (!strcmp(st, "reorder") || !strcmp(st, "reorder_flip")) {
192                   set_state(PART:"bg_reorder_clip", "reorder", 0.0);
193                }
194             }
195          }
196          GENLIST_PROGRAM_FOCUS_NORMAL
197       }
198    }