Updated shadow-button transition demo to use states and sub-states
[platform/core/uifw/dali-demo.git] / resources / style / style-example-theme-one.json.in
1 {
2   "constants":
3   {
4     "STYLE_DIR":"{APPLICATION_RESOURCE_PATH}/style"
5   },
6   "styles":
7   {
8     "Title":{
9       "textColor":"#0000ff",
10       "background":
11       {
12         "visualType":"COLOR",
13         "mixColor": [ 1.0, 1.0, 1.0, 1.0 ]
14       }
15     },
16     "TableView":{
17       "background":
18       {
19         "visualType":"COLOR",
20         "mixColor": [ 1.0, 1.0, 1.0, 0.03 ]
21       }
22     },
23     "FlexContainer":{
24       "background":
25       {
26         "visualType":"COLOR",
27         "mixColor": [ 1.0, 1.0, 1.0, 0.1 ]
28       }
29     },
30     "RadioButton":{
31       "label":{
32         "textColor": [1,1,1,1]
33       }
34     },
35     "CheckBoxButton":{
36       "label":{
37         "textColor": [1,1,1,1]
38       }
39     },
40     "ColorLabel1":{
41       "textColor": [1,0,0,1]
42     },
43     "ColorLabel2":{
44       "textColor": [0,1,0,1]
45     },
46     "ColorLabel3":{
47       "textColor": [0.3,0.3,1,1]
48     },
49     "ThemeLabel":{
50       "textColor":[0,1,1,1]
51     },
52     "PopupTitle":{
53       "textColor":[1,1,1,1]
54     },
55     "PopupBody":{
56       "textColor":[1,1,0,1]
57     },
58     "TextLabel":{
59       "textColor":[0,0,0,1]
60     },
61     "ColorSlider1":{
62       "styles":["Slider"]
63     },
64     "ColorSlider2":{
65       "styles":["slider"]
66     },
67     "ColorSlider3":{
68       "styles":["slider"]
69     },
70     "ImageChannelControl":
71     {
72       "enableVisibilityTransition":
73       [
74         {
75           "target":"imageVisual",
76           "property":"opacity",
77           "initialValue":0,
78           "targetValue":1,
79           "animator":
80           {
81             "alphaFunction":"EASE_IN_OUT",
82             "timePeriod":
83             {
84               "duration":0.25,
85               "delay":0
86             }
87           }
88         },
89         {
90           "target":"imageVisual",
91           "property":"size",
92           "targetValue":[1,1]
93         }
94       ],
95       "disableVisibilityTransition":
96       [
97         {
98           "target":"imageVisual",
99           "property":"opacity",
100           "targetValue":0,
101           "animator":
102           {
103             "alphaFunction":"EASE_IN_OUT",
104             "timePeriod":
105             {
106               "duration":0.25,
107               "delay":0
108             }
109           }
110         },
111         {
112           "target":"imageVisual",
113           "property":"size",
114           "targetValue":[1,1,1]
115         }
116       ]
117     },
118     "ShadowButton":
119     {
120       "states":
121       {
122         "NORMAL":
123         {
124           "visuals":
125           {
126             "backgroundVisual":{
127               "visualType":"IMAGE",
128               "url":"{STYLE_DIR}/images/shadowButtonBg.9.png"
129             },
130
131             "checkboxBgVisual":{
132               "visualType":"IMAGE",
133               "url":"{STYLE_DIR}/images/CheckBg.png",
134               "transform":{
135                 "size":[0.09, 0.28],
136                 "offset":[30,0],
137                 "offsetSizeMode":[1,1,0,0],
138                 "origin":"CENTER_BEGIN",
139                 "anchorPoint":"CENTER_BEGIN"
140               }
141             },
142
143             "labelVisual":{
144               "visualType":"TEXT",
145               "text":"Don't show again",
146               "pointSize":20,
147               "horizontalAlignment":"END",
148               "verticalAlignment":"CENTER",
149               "textColor":[1,1,1,1],
150               "mixColor":[0, 0, 0, 1],
151               "transform":{
152                 "size":[0.9, 0.9],
153                 "offset":[-30,0],
154                 "offsetSizeMode":[1,1,0,0],
155                 "origin":"CENTER_END",
156                 "anchorPoint":"CENTER_END"
157               }
158             }
159           },
160
161           "states":
162           {
163             "CHECKED":
164             {
165               "visuals":
166               {
167                 "checkboxFgVisual":{
168                   "visualType":"IMAGE",
169                   "url":"{STYLE_DIR}/images/Tick.png",
170                   "transform":{
171                     "size":[0.09, 0.28],
172                     "offset":[30,0],
173                     "offsetSizeMode":[1,1,0,0],
174                     "origin":"CENTER_BEGIN",
175                     "anchorPoint":"CENTER_BEGIN"
176                   }
177                 }
178               },
179               "entryTransition":
180               [
181                 {
182                   "target":"checkboxFgVisual",
183                   "property":"pixelArea",
184                   "initialValue":[0.0, 0.0, 0.0, 1.0],
185                   "targetValue":[0.0, 0.0, 1.0, 1.0],
186                   "animator":
187                   {
188                     "alphaFunction":"EASE_IN",
189                     "timePeriod":
190                     {
191                       "duration":0.4,
192                       "delay":0
193                     }
194                   }
195                 },
196                 {
197                   "target":"checkboxFgVisual",
198                   "property":"size",
199                   "initialValue":[0.0, 0.37],
200                   "targetValue":[0.12, 0.37],
201                   "animator":
202                   {
203                     "alphaFunction":"EASE_IN",
204                     "timePeriod":
205                     {
206                       "duration":0.4,
207                       "delay":0
208                     }
209                   }
210                 }
211               ],
212               "exitTransition":
213               [
214                 {
215                   "target":"checkboxFgVisual",
216                   "property":"pixelArea",
217                   "initialValue":[0.0, 0.0, 1.0, 1.0],
218                   "targetValue":[0.0, 0.0, 0.0, 1.0],
219                   "animator":
220                   {
221                     "alphaFunction":"EASE_OUT",
222                     "timePeriod":
223                     {
224                       "duration":0.4,
225                       "delay":0
226                     }
227                   }
228                 },
229                 {
230                   "target":"checkboxFgVisual",
231                   "property":"size",
232                   "targetValue":[0.0, 0.37],
233                   "animator":
234                   {
235                     "alphaFunction":"EASE_OUT",
236                     "timePeriod":
237                     {
238                       "duration":0.4,
239                       "delay":0
240                     }
241                   }
242                 }
243               ]
244             },
245             "UNCHECKED":
246             {
247             }
248           }
249         },
250         //"FOCUSED"
251         "DISABLED":
252         {
253           "visuals":
254           {
255             "checkboxBgVisual":{
256               "visualType":"IMAGE",
257               "url":"{STYLE_DIR}/images/CheckBg.png",
258               "transform":{
259                 "size":[0.09, 0.28],
260                 "offset":[30,0],
261                 "offsetSizeMode":[1,1,0,0],
262                 "origin":"CENTER_BEGIN",
263                 "anchorPoint":"CENTER_BEGIN"
264               }
265             },
266
267             "checkboxFgVisual":{
268               "visualType":"IMAGE",
269               "url":"{STYLE_DIR}/images/Tick.png",
270               "transform":{
271                 "size":[0.09, 0.28],
272                 "offset":[30,0],
273                 "offsetSizeMode":[1,1,0,0],
274                 "origin":"CENTER_BEGIN",
275                 "anchorPoint":"CENTER_BEGIN"
276               }
277             },
278
279             "labelVisual":{
280               "visualType":"TEXT",
281               "text":"Don't show again",
282               "pointSize":20,
283               "horizontalAlignment":"END",
284               "verticalAlignment":"CENTER",
285               "textColor":[1,1,1,1],
286               "mixColor":[0.3, 0.3, 0.3, 1],
287               "transform":{
288                 "size":[0.9, 0.9],
289                 "offset":[-30,0],
290                 "offsetSizeMode":[1,1,0,0],
291                 "origin":"CENTER_END",
292                 "anchorPoint":"CENTER_END"
293               }
294             }
295           }
296         }
297       },
298       "transitions":
299       [
300         {
301           "from":"DISABLED",
302           "to":"NORMAL",
303           "visualName":"backgroundVisual",
304           "effect":"FADE_IN",
305           "animator":
306           {
307             "alphaFunction":"EASE_OUT_BACK",
308             "duration":0.8
309           }
310         },
311         {
312           "from":"DISABLED",
313           "to":"NORMAL",
314           "visualName":"*",
315           "animator":
316           {
317             "alphaFunction":"EASE_OUT_BACK",
318             "duration":0.8
319           }
320         },
321         {
322           "from":"NORMAL",
323           "to":"DISABLED",
324           "visualName":"backgroundVisual",
325           "effect":"FADE_OUT",
326           "animator":
327           {
328             "alphaFunction":"EASE_OUT_BACK",
329             "duration":0.8
330           }
331         },
332         {
333           "from":"NORMAL",
334           "to":"DISABLED",
335           "visualName":"*",
336           "animator":
337           {
338             "alphaFunction":"EASE_OUT_BACK",
339             "duration":0.8
340           }
341         }
342       ]
343     },
344     "BeatControl":
345     {
346       "beatVisual":{
347         "visualType":"IMAGE",
348         "url":"{APPLICATION_RESOURCE_PATH}/images/Logo-for-demo.png"
349       },
350
351       "bounceTransition":
352       [
353         {
354           "target":"beatVisual",
355           "property":"size",
356           "initialValue":[0.5, 0.5],
357           "targetValue":[0.75, 0.75],
358           "animator":
359           {
360             "alphaFunction":"BOUNCE",
361             "timePeriod":
362             {
363               "duration":0.5,
364               "delay":0
365             }
366           }
367         }
368       ],
369
370       "leftTransition":
371       [
372         {
373           "target":"beatVisual",
374           "property":"offset",
375           "initialValue":[0, 0],
376           "targetValue":[0.25, 0],
377           "animator":
378           {
379             "alphaFunction":"BOUNCE",
380             "timePeriod":
381             {
382               "duration":0.5,
383               "delay":0
384             }
385           }
386         }
387       ],
388
389       "upTransition":
390       [
391         {
392           "target":"beatVisual",
393           "property":"offset",
394           "initialValue":[0, 0],
395           "targetValue":[0, 0.25],
396           "animator":
397           {
398             "alphaFunction":"BOUNCE",
399             "timePeriod":
400             {
401               "duration":0.5,
402               "delay":0
403             }
404           }
405         }
406       ],
407
408       "fadeTransition":
409       [
410         {
411           "target":"beatVisual",
412           "property":"opacity",
413           "targetValue":0,
414           "animator":
415           {
416             "alphaFunction":"BOUNCE",
417             "timePeriod":
418             {
419               "duration":0.8,
420               "delay":0
421             }
422           }
423         }
424       ]
425     }
426   }
427 }