d0caa87b53a7607136d40a0d08ea45d631c4b76d
[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       "visuals":
128       {
129         "image":
130         {
131           "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND
132         }
133       }
134     },
135     "TextLabelRosemary":
136     {
137       "fontFamily":"Rosemary"
138     },
139     "TextLabel":
140     {
141       "fontStyle":{"weight":"normal"},
142       "pointSize":18
143     },
144     "LauncherLabel":
145     {
146       "pointSize":18
147     },
148
149     "ToolbarLabel":
150     {
151       "pointSize":18
152     },
153
154     "BuilderLabel":
155     {
156       "pointSize":13
157     },
158
159     "ScrollView":
160     {
161       "overshootEffectColor":"B018"
162     },
163
164     "ImageScalingGroupLabel":
165     {
166       "pointSize":9
167     },
168
169     "ImageScalingButton":
170     {
171       "label":{
172         "pointSize":11
173       }
174     },
175
176     "LauncherBackground":
177     {
178       "background":
179       {
180         "visualType": "GRADIENT",
181         "center": [240, 400],
182         "radius": 932,
183         "units": "USER_SPACE",
184         "stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
185       }
186     }
187   }
188 }