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