87133243941e2474626c7a54177d7f4a0837feba
[platform/core/uifw/dali-demo.git] / resources / style / demo-theme.json.in
1 /*
2  * Copyright (c) 2000-2016 Samsung Electronics Co., Ltd
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  */
16
17 {
18   "styles":
19   {
20     "ConfirmationPopup":{
21       "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/00_popup_bg.9.png"
22     },
23
24     "CustomPopupStyle":{
25       "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
26       "popupBackgroundBorder":[0,4,4,0],
27       "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
28       "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
29       "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
30       "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
31     },
32
33     "DemoTile":
34     {
35       "states":
36       {
37         "NORMAL":
38         {
39           "color":[0.4, 0.6, 0.9, 0.6],
40           "visuals":
41           {
42             "image":
43             {
44               "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture.9.png",
45 // TILE_BACKGROUND_ALPHA
46 // This shader takes a texture.
47 // An alpha discard is performed.
48 // The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
49               "shader":
50               {
51                 "fragmentShader":[
52                   "  varying mediump vec2  vTexCoord;",
53                   "  uniform lowp    vec4  uColor;",
54                   "  uniform sampler2D     sTexture;",
55                   "  uniform mediump vec3  uCustomPosition;",
56                   "",
57                   "  void main()",
58                   "  {",
59                   "    if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
60                   "    {",
61                   "      discard;",
62                   "    }",
63                   "",
64                   "    mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
65                   "    mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
66                   "    mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
67                   "",
68                   "    gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
69                   "  }"
70                 ]
71               }
72             }
73           }
74         },
75         "FOCUSED":
76         {
77           "color":[0.3, 0.5, 0.8, 0.5],
78           "visuals":
79           {
80             "image":
81             {
82               "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture-focused.9.png",
83 // TILE_BACKGROUND_ALPHA
84 // This shader takes a texture.
85 // An alpha discard is performed.
86 // The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
87               "shader":
88               {
89                 "fragmentShader":[
90                   "  varying mediump vec2  vTexCoord;",
91                   "  uniform lowp    vec4  uColor;",
92                   "  uniform sampler2D     sTexture;",
93                   "  uniform mediump vec3  uCustomPosition;",
94                   "",
95                   "  void main()",
96                   "  {",
97                   "    if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
98                   "    {",
99                   "      discard;",
100                   "    }",
101                   "",
102                   "    mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
103                   "    mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
104                   "    mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
105                   "",
106                   "    gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
107                   "  }"
108                 ]
109               }
110             }
111           }
112         }
113       }
114     },
115     "FocusActor":
116     {
117       "visuals":
118       {
119         "image":
120         {
121           "url":"{APPLICATION_RESOURCE_PATH}/images/tile-focus.9.png"
122         }
123       }
124     },
125     "DemoTileBorder":
126     {
127       "states":
128       {
129         "NORMAL":
130         {
131           "visuals":
132           {
133             "image":
134             {
135               "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND
136             }
137           }
138         },
139         "FOCUSED":
140         {
141           "visuals":
142           {
143             "image":
144             {
145               "visualType":"COLOR",
146               "mixColor":[1,0,1,1]
147
148               //"url":"{APPLICATION_RESOURCE_PATH}/images/item-background-focused.9.png" // TILE_BACKGROUND
149             }
150           }
151         }
152       }
153     },
154     "TextLabelRosemary":
155     {
156       "fontFamily":"Rosemary"
157     },
158     "TextLabel":
159     {
160       "fontStyle":{"weight":"normal"},
161       "pointSize":18
162     },
163     "LauncherLabel":
164     {
165       "pointSize":18
166     },
167
168     "ToolbarLabel":
169     {
170       "pointSize":18
171     },
172
173     "BuilderLabel":
174     {
175       "pointSize":13
176     },
177
178     "ScrollView":
179     {
180       "overshootEffectColor":"B018"
181     },
182
183     "ImageScalingGroupLabel":
184     {
185       "pointSize":9
186     },
187
188     "ImageScalingButton":
189     {
190       "label":{
191         "pointSize":11
192       }
193     },
194
195     "LauncherBackground":
196     {
197       "background":
198       {
199         "visualType": "GRADIENT",
200         "center": [240, 400],
201         "radius": 932,
202         "units": "USER_SPACE",
203         "stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
204       }
205     }
206   }
207 }