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