summaryrefslogtreecommitdiff
path: root/themes/widgets/badge.edc
blob: b19b8375fe47f0f37006034dbe9724b2910ee4a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/*
 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation, Inc., 51
 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 *
 */

#define STYLE1_ICON_W			50
#define STYLE1_ICON_H                   50
#define STYLE1_BADGE_W                  34
#define STYLE1_BADGE_H                  34
#define STYLE1_BADGE_BORDER		16
#define STYLE1_BADGE_PADDING             8
#define STYLE1_BADGE_OVER_X              8
#define STYLE1_BADGE_OVER_Y             -6

#define STYLE2_ICON_W                   50
#define STYLE2_ICON_H                   50
#define STYLE2_BADGE_W                  40
#define STYLE2_BADGE_H                  40
#define STYLE2_BADGE_BORDER             19
#define STYLE2_BADGE_PADDING             8
#define STYLE2_BADGE_OVER_X              2
#define STYLE2_BADGE_OVER_Y             -8

group
{
        name: "elm/icon_badge/base/style1";

        images {
                image : "00_badge_34x34.png" COMP;
        }

        parts {
                part {
                        name: "elm.icon";
                        type: SWALLOW;
                        scale: 1;
                        description {
                                state: "default" 0.0;
                                min: STYLE1_ICON_W STYLE1_ICON_H;
                                rel1 { relative: 0.0 0.0; }
                                rel2 { relative: 1.0 1.0; }
                        }
                }

                part {
                        name: "elm.badge.bg";
                        type: IMAGE;
                        scale: 1;
                        description {
                                state: "default" 0.0;
                                rel1 { relative: 0.0 0.0; to_x: "elm.badge.padding.left"; to_y: "elm.badge.text"; }
                                rel2 { relative: 1.0 1.0; to_x: "elm.badge.padding.right"; to_y: "elm.badge.text"; }
                                image.normal: "00_badge_34x34.png";
                                image.border: STYLE1_BADGE_BORDER STYLE1_BADGE_BORDER STYLE1_BADGE_BORDER STYLE1_BADGE_BORDER;
                                image.border_scale:1;
                        }
                }

                part {
                        name: "elm.badge.text";
			type: TEXT;
                        scale: 1;
                        description {
                                state: "default" 0.0;
                                fixed: 1 1;
                                align: 1.0 0.5;
                                rel1 { relative: (STYLE1_ICON_W-STYLE1_BADGE_W+STYLE1_BADGE_OVER_X+STYLE1_BADGE_PADDING)/STYLE1_ICON_W (STYLE1_BADGE_OVER_Y)/STYLE1_ICON_H; to: "elm.icon"; }
                                rel2 { relative: (STYLE1_ICON_W+STYLE1_BADGE_OVER_X-STYLE1_BADGE_PADDING)/STYLE1_ICON_W (STYLE1_BADGE_H+STYLE1_BADGE_OVER_Y)/STYLE1_ICON_H; to: "elm.icon"; }
                                text {
                                        font: "SLP";
                                        size: 20;
                                        min: 1 1;
                                        align: 0.5 0.5;
                                        text_class: "slp";
                                }
                                color: 255 255 255 255;
                        }
                }

                part {
                        name: "elm.badge.padding.left";
                        type: RECT;
                        scale : 1;
                        description {
                                state: "default" 0.0;
                                min: STYLE1_BADGE_PADDING 0;
                                fixed: 1 0;
                                align: 1.0 0.0;
                                rel1 { relative: 0.0 0.0; to: "elm.badge.text"; }
                                rel2 { relative: 0.0 1.0; to: "elm.badge.text"; }
                                color: 0 0 0 0;
                        }
                }

                part {
                        name: "elm.badge.padding.right";
                        type: RECT;
                        scale : 1;
                        description {
                                state: "default" 0.0;
                                min: STYLE1_BADGE_PADDING 0;
                                fixed: 1 0;
                                align: 0.0 0.0;
                                rel1 { relative: 1.0 0.0; to: "elm.badge.text"; }
                                rel2 { relative: 1.0 1.0; to: "elm.badge.text"; }
                                color: 0 0 0 0;
                        }
                }
        }
}

group
{
        name: "elm/icon_badge/base/style2";

        images {
                image : "00_badge_40x40.png" COMP;
        }

        parts {
                part {
                        name: "elm.icon";
                        type: SWALLOW;
                        scale: 1;
                        description {
                                state: "default" 0.0;
                                min: STYLE2_ICON_W STYLE2_ICON_H;
                                rel1 { relative: 0.0 0.0; }
                                rel2 { relative: 1.0 1.0; }
                        }
                }

                part {
                        name: "elm.badge.bg";
                        type: IMAGE;
                        scale: 1;
                        description {
                                state: "default" 0.0;
                                rel1 { relative: 0.0 0.0; to_x: "elm.badge.padding.left"; to_y: "elm.badge.text"; }
                                rel2 { relative: 1.0 1.0; to_x: "elm.badge.padding.right"; to_y: "elm.badge.text"; }
                                image.normal: "00_badge_40x40.png";
                                image.border: STYLE2_BADGE_BORDER STYLE2_BADGE_BORDER STYLE2_BADGE_BORDER STYLE2_BADGE_BORDER;
                                image.border_scale:1;
                        }
                }

                part {
                        name: "elm.badge.text";
                        type: TEXT;
                        scale: 1;
                        description {
                                state: "default" 0.0;
                                fixed: 1 1;
                                align: 1.0 0.5;
                                rel1 { relative: (STYLE2_ICON_W-STYLE2_BADGE_W+STYLE2_BADGE_OVER_X+STYLE2_BADGE_PADDING)/STYLE2_ICON_W (STYLE2_BADGE_OVER_Y)/STYLE2_ICON_H; to: "elm.icon"; }
                                rel2 { relative: (STYLE2_ICON_W+STYLE2_BADGE_OVER_X-STYLE2_BADGE_PADDING)/STYLE2_ICON_W (STYLE2_BADGE_H+STYLE2_BADGE_OVER_Y)/STYLE2_ICON_H; to: "elm.icon"; }
                                text {
                                        font: "SLP";
                                        size: 22;
                                        min: 1 1;
                                        align: 0.6 0.48;
                                        text_class: "slp";
                                }
                                color: 255 255 255 255;
                        }
                }

                part {
                        name: "elm.badge.padding.left";
                        type: RECT;
                        scale : 1;
                        description {
                                state: "default" 0.0;
                                min: STYLE2_BADGE_PADDING 0;
                                fixed: 1 0;
                                align: 1.0 0.0;
                                rel1 { relative: 0.0 0.0; to: "elm.badge.text"; }
                                rel2 { relative: 0.0 1.0; to: "elm.badge.text"; }
                                color: 0 0 0 0;
                        }
                }

                part {
                        name: "elm.badge.padding.right";
                        type: RECT;
                        scale : 1;
                        description {
                                state: "default" 0.0;
                                min: STYLE2_BADGE_PADDING 0;
                                fixed: 1 0;
                                align: 0.0 0.0;
                                rel1 { relative: 1.0 0.0; to: "elm.badge.text"; }
                                rel2 { relative: 1.0 1.0; to: "elm.badge.text"; }
                                color: 0 0 0 0;
                        }
                }
        }
}