[Genlist] Fix entry dialouge bg programs
[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       }
51       programs {
52          GENLIST_PROGRAM_SOUND("elm.text")
53          GENLIST_PROGRAM_DISABLED( target: "elm.icon"; target: "elm.text"; )
54          GENLIST_PROGRAM_SOUND("bg")
55       }
56    }
57
58 // 2.2.7. Genlist Edit mode (rename)
59 // Should be used as decorate all item style
60    group { GENLIST_NAME("edit_default/default")
61
62       GENLIST_PROLOG_NORMAL
63
64       data.item: "contents" "elm.edit.icon.1 elm.edit.icon.2";
65
66       parts {
67          GENLIST_PART_BASE
68          GENLIST_PART_BG_NORMAL
69          GENLIST_PART_EXPANDED_PAD
70          GENLIST_PART_SPACER("elm.padding.left",
71             GENLIST_DESCRIPTION_L("elm.swallow.pad",
72                min: GENLIST_PADDING_SIZE_LEFT 0;
73                max: GENLIST_PADDING_SIZE_LEFT -1;
74                fixed: 1 0;
75             )
76             description { state: "reorder" 0.0;
77                inherit: "default" 0.0;
78                min: DIALOGUE_PADDING_SIZE_LEFT 0;
79                max: DIALOGUE_PADDING_SIZE_LEFT -1;
80             }
81          )
82          GENLIST_PART_SPACER("elm.padding.right",
83             description { state: "default" 0.0;
84                min: GENLIST_PADDING_SIZE_RIGHT 0;
85                max: GENLIST_PADDING_SIZE_RIGHT -1;
86                fixed: 1 0;
87                align: 1.0 0.5;
88                rel1.to: "base";
89                rel2.to: "base";
90                rel1.relative: 1 0;
91             }
92             description { state: "reorder" 0.0;
93                inherit: "default" 0.0;
94                min: DIALOGUE_PADDING_SIZE_RIGHT 0;
95                max: DIALOGUE_PADDING_SIZE_RIGHT -1;
96             }
97          )
98          GENLIST_PART_ICON("elm.edit.icon.1",
99             GENLIST_DESCRIPTION_L("elm.padding.left",
100                align: 1 0.5;
101                GENLIST_PARAM_ICON_CHECK_RADIO
102             )
103             description { state: "decorate" 0.0;
104                inherit: "default" 0.0;
105                align: 0 0.5;
106             }
107             description { state: "flipped" 0.0;
108                inherit: "default" 0.0;
109                rel1.relative: 0 0;
110                rel2.relative: 0 1;
111                align: 1 0.5;
112             }
113          )
114          GENLIST_PART_PADDING_L("elm.edit.icon1.right", "elm.edit.icon.1")
115          GENLIST_PART_ICON("elm.swallow.decorate.content",
116             GENLIST_DESCRIPTION_LR("elm.edit.icon1.right", "elm.edit.icon.2",
117                min: 0 GENLIST_HEIGHT_1LINE;
118             )
119          )
120          GENLIST_PART_BOTTOM_LINE
121          GENLIST_PART_ICON("elm.edit.icon.2",
122             GENLIST_DESCRIPTION_R("elm.padding.right",
123               align: 0 0.5;
124               max: 48 48;
125             )
126             description { state: "decorate" 0.0;
127                inherit: "default" 0.0;
128                align: 1 0.5;
129             }
130             description { state: "flipped" 0.0;
131                inherit: "default" 0.0;
132                rel1.relative: 1 0;
133                rel2.relative: 1 1;
134                align: 0 0.5;
135             }
136          )
137       }
138       programs {
139          GENLIST_PROGRAM_DISABLED(
140             target: "bg";
141             target: "bg_reorder";
142             target: "bottom_line";
143             target: "bottom_line2";
144          )
145          GENLIST_PROGRAM_SELECT(
146             target: "bg";
147             target: "bg_reorder";
148             target: "bottom_line";
149             target: "bottom_line2";
150          )
151          // BG of swallowed VIEW(it) is visible 0
152          GENLIST_PROGRAM_SOUND("bg")
153          GENLIST_PROGRAM_SOUND("bg_reorder")
154          GENLIST_PROGRAM_REORDER(
155            target: "bg_clip";
156            target: "bg_reorder_clip";
157            target: "bottom_line_clip";
158            target: "elm.padding.left";
159            target: "elm.padding.right";
160          )
161          GENLIST_PROGRAMS_DECORATE_EFFECT(
162             target: "elm.edit.icon.1";
163             target: "elm.edit.icon.2";
164          )
165          GENLIST_PROGRAM_FLIP_EFFECT_TARGET(
166             target: "elm.edit.icon.1";
167             target: "elm.edit.icon.2";
168          )
169          program { name: "flip_enabled";
170             signal:  "elm,state,flip,enabled";
171             source:  "elm";
172             script {
173                new st[31];
174                new Float:vl;
175                get_state(PART:"bg_reorder_clip", st, 30, vl);
176                if (!strcmp(st, "reorder") || !strcmp(st, "reorder_flip")) {
177                   set_state(PART:"bg_reorder_clip", "reorder_flip", 0.0);
178                 }
179             }
180          }
181          program { name: "flip_disabled";
182             signal:  "elm,state,flip,disabled";
183             source:  "elm";
184             script {
185                new st[31];
186                new Float:vl;
187                get_state(PART:"bg_reorder_clip", st, 30, vl);
188                if (!strcmp(st, "reorder") || !strcmp(st, "reorder_flip")) {
189                   set_state(PART:"bg_reorder_clip", "reorder", 0.0);
190                }
191             }
192          }
193       }
194    }