CONFIGURE_FILE( resources-location.in ${DEMO_SHARED}/resources-location.cpp )
#Replace @DEMO_STYLE_IMAGE_DIR@ in following files
+CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/base-theme.json.in ${LOCAL_STYLE_DIR}/base-theme.json )
CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/demo-theme.json.in ${LOCAL_STYLE_DIR}/demo-theme.json )
+CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/examples-theme.json.in ${LOCAL_STYLE_DIR}/examples-theme.json )
+CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/tests-theme.json.in ${LOCAL_STYLE_DIR}/tests-theme.json )
CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/animated-gradient-call-active-style.json.in ${LOCAL_STYLE_DIR}/animated-gradient-call-active-style.json )
CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/contact-cards-example-theme.json.in ${LOCAL_STYLE_DIR}/contact-cards-example-theme.json )
CONFIGURE_FILE( ${LOCAL_STYLE_DIR}/progress-bar-example-theme.json.in ${LOCAL_STYLE_DIR}/progress-bar-example-theme.json )
textdomain(DALI_DEMO_DOMAIN_LOCAL);
setlocale(LC_ALL, DEMO_LANG);
- Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
+ Application app = Application::New( &argc, &argv, DEMO_STYLE_DIR "/examples-theme.json" );
// Create the demo launcher
DaliTableView demo(app);
+++ /dev/null
-// Image Wall example
-//
-// Example usage of Dali API
-//
-
-var imageDir = "@DEMO_STYLE_IMAGE_DIR@";
-
-var NUMBER_OF_IMAGES = 40; // for now use 16 ( demo files go up to 30)
-var VIDEO_WALL_ROWS = 7; // use 3 rows for the video wall
-var VIDEO_WALL_COLUMNS = 12; // use 12 columns for the video wall
-var VIDEO_WALL_ITEM_SIZE = 128; // width / height of a item in the video wall
-var BORDER_SIZE = 5;
-var VIDEO_WALL_ITEM_SIZE_NO_BORDER = VIDEO_WALL_ITEM_SIZE - BORDER_SIZE;
-var VIDEO_WALL_WIDTH = VIDEO_WALL_COLUMNS * VIDEO_WALL_ITEM_SIZE;
-var VIDEO_WALL_HEIGHT = VIDEO_WALL_ROWS * VIDEO_WALL_ITEM_SIZE;
-
-var daliApp = {};
-
-var wallRootActor; // the root actor of the video wall
-
-// we want demo images of format gallery-small-1.jpg
-daliApp.getFileName = function(index) {
- fileName = "gallery-small-" + (index+1) + ".jpg";
- return fileName;
-}
-
-daliApp.createRootActor = function() {
- wallRootActor = new dali.Actor();
- wallRootActor.parentOrigin = dali.CENTER;
- wallRootActor.anchorPoint = dali.CENTER;
- dali.stage.add(wallRootActor);
-}
-
-daliApp.getWallActorIndex = function(x, y) {
- return x + y * VIDEO_WALL_COLUMNS;
-}
-
-daliApp.createActors = function() {
- daliApp.createRootActor();
-
- for (y = 0; y < VIDEO_WALL_ROWS; ++y) {
- for (x = 0; x < VIDEO_WALL_COLUMNS; ++x) {
-
- var actorIndex = daliApp.getWallActorIndex(x, y);
- var imageView = new dali.Control("ImageView");
-
- // wrap image index between 0 and NUMBER_OF_IMAGES
- var imageIndex = actorIndex % NUMBER_OF_IMAGES;
-
- imageView.image = imageDir + daliApp.getFileName(imageIndex);
-
- imageView.parentOrigin = dali.CENTER;
- imageView.anchorPoint = dali.CENTER;
- imageView.size = [VIDEO_WALL_ITEM_SIZE_NO_BORDER, VIDEO_WALL_ITEM_SIZE_NO_BORDER, 1.0]; // start with zero size so it zooms up
-
- var xPosition = x * VIDEO_WALL_ITEM_SIZE;
- // as the middle the wall is at zero (relative to wallRootActor), we need to subtract half the wall width.
- // + add half item size because the item anchor point is the center of the wallRootActor.
- xPosition = xPosition - (VIDEO_WALL_WIDTH / 2) + (VIDEO_WALL_ITEM_SIZE / 2);
-
- var yPosition = y * VIDEO_WALL_ITEM_SIZE;
- yPosition = yPosition - (VIDEO_WALL_HEIGHT / 2) + (VIDEO_WALL_ITEM_SIZE / 2);
-
- imageView.position = [xPosition, yPosition, 0.0];
-
- // Add to the video wall root actor.
- wallRootActor.add(imageView);
- }
- }
-}
-
-function Initialise() {
- daliApp.createActors();
-}
-
-Initialise();
+base-theme.json
demo-theme.json
+examples-theme.json
+tests-theme.json
animated-gradient-call-active-style.json
contact-cards-example-theme.json
progress-bar-example-theme.json
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "styles":
+ {
+ "ConfirmationPopup":{
+ "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/00_popup_bg.9.png"
+ },
+
+ "CustomPopupStyle":{
+ "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
+ "popupBackgroundBorder":[0,4,4,0],
+ "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
+ "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
+ "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
+ "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
+ },
+
+ "DemoTileBase":
+ {
+ "states":
+ {
+ "NORMAL":
+ {
+ "color":[0.4, 0.6, 0.9, 0.6],
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture.9.png",
+// TILE_BACKGROUND_ALPHA
+// This shader takes a texture.
+// An alpha discard is performed.
+// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
+ "shader":
+ {
+ "fragmentShader":[
+ " varying mediump vec2 vTexCoord;",
+ " uniform lowp vec4 uColor;",
+ " uniform sampler2D sTexture;",
+ " uniform mediump vec3 uCustomPosition;",
+ "",
+ " void main()",
+ " {",
+ " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
+ " {",
+ " discard;",
+ " }",
+ "",
+ " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
+ " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
+ " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
+ "",
+ " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
+ " }"
+ ]
+ }
+ }
+ }
+ },
+ "FOCUSED":
+ {
+ "color":[0.3, 0.5, 0.8, 0.5],
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture-focused.9.png",
+// TILE_BACKGROUND_ALPHA
+// This shader takes a texture.
+// An alpha discard is performed.
+// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
+ "shader":
+ {
+ "fragmentShader":[
+ " varying mediump vec2 vTexCoord;",
+ " uniform lowp vec4 uColor;",
+ " uniform sampler2D sTexture;",
+ " uniform mediump vec3 uCustomPosition;",
+ "",
+ " void main()",
+ " {",
+ " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
+ " {",
+ " discard;",
+ " }",
+ "",
+ " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
+ " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
+ " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
+ "",
+ " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
+ " }"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "FocusActor":
+ {
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/tile-focus.9.png"
+ }
+ }
+ },
+ "DemoTileBorder":
+ {
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND
+ }
+ }
+ },
+ "TextLabelRosemary":
+ {
+ "fontFamily":"Rosemary"
+ },
+ "TextLabel":
+ {
+ "fontStyle":{"weight":"normal"},
+ "pointSize":18
+ },
+ "LauncherLabel":
+ {
+ "pointSize":18
+ },
+
+ "ToolbarLabel":
+ {
+ "pointSize":18
+ },
+
+ "BuilderLabel":
+ {
+ "pointSize":13
+ },
+
+ "ScrollView":
+ {
+ "overshootEffectColor":"B018"
+ },
+
+ "ImageScalingGroupLabel":
+ {
+ "pointSize":9
+ },
+
+ "ImageScalingButton":
+ {
+ "label":{
+ "pointSize":11
+ }
+ },
+//
+// Simple Visuals Application Style section
+//
+ "MyControl":
+ {
+ "states":
+ {
+ "NORMAL":
+ {
+ "visuals":
+ {
+ "iconVisual":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/application-icon-13.png"
+ }
+ }
+ },
+ "FOCUSED":
+ {
+ "visuals":
+ {
+ "iconVisual":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/application-icon-83.png"
+ }
+ }
+ }
+ }
+ }
+ }
+}
/*
- * Copyright (c) 2000-2016 Samsung Electronics Co., Ltd
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*/
{
+ "includes":
+ [
+ "{APPLICATION_RESOURCE_PATH}/style/base-theme.json"
+ ],
+
"styles":
{
- "ConfirmationPopup":{
- "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/00_popup_bg.9.png"
- },
-
- "CustomPopupStyle":{
- "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
- "popupBackgroundBorder":[0,4,4,0],
- "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
- "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
- "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
- "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
- },
-
"DemoTile":
{
- "states":
- {
- "NORMAL":
- {
- "color":[0.4, 0.6, 0.9, 0.6],
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture.9.png",
-// TILE_BACKGROUND_ALPHA
-// This shader takes a texture.
-// An alpha discard is performed.
-// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
- "shader":
- {
- "fragmentShader":[
- " varying mediump vec2 vTexCoord;",
- " uniform lowp vec4 uColor;",
- " uniform sampler2D sTexture;",
- " uniform mediump vec3 uCustomPosition;",
- "",
- " void main()",
- " {",
- " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
- " {",
- " discard;",
- " }",
- "",
- " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
- " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
- " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
- "",
- " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
- " }"
- ]
- }
- }
- }
- },
- "FOCUSED":
- {
- "color":[0.3, 0.5, 0.8, 0.5],
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture-focused.9.png",
-// TILE_BACKGROUND_ALPHA
-// This shader takes a texture.
-// An alpha discard is performed.
-// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
- "shader":
- {
- "fragmentShader":[
- " varying mediump vec2 vTexCoord;",
- " uniform lowp vec4 uColor;",
- " uniform sampler2D sTexture;",
- " uniform mediump vec3 uCustomPosition;",
- "",
- " void main()",
- " {",
- " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
- " {",
- " discard;",
- " }",
- "",
- " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
- " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
- " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
- "",
- " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
- " }"
- ]
- }
- }
- }
- }
- }
- },
- "FocusActor":
- {
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/tile-focus.9.png"
- }
- }
- },
- "DemoTileBorder":
- {
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND
- }
- }
- },
- "TextLabelRosemary":
- {
- "fontFamily":"Rosemary"
- },
- "TextLabel":
- {
- "fontStyle":{"weight":"normal"},
- "pointSize":18
- },
- "LauncherLabel":
- {
- "pointSize":18
- },
-
- "ToolbarLabel":
- {
- "pointSize":18
- },
-
- "BuilderLabel":
- {
- "pointSize":13
- },
-
- "ScrollView":
- {
- "overshootEffectColor":"B018"
- },
-
- "ImageScalingGroupLabel":
- {
- "pointSize":9
- },
-
- "ImageScalingButton":
- {
- "label":{
- "pointSize":11
- }
+ "styles":[ "DemoTileBase" ]
},
"LauncherBackground":
"units": "USER_SPACE",
"stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
}
- },
-//
-// Simple Visuals Application Style section
-//
- "MyControl":
- {
- "states":
- {
- "NORMAL":
- {
- "visuals":
- {
- "iconVisual":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/application-icon-13.png"
- }
- }
- },
- "FOCUSED":
- {
- "visuals":
- {
- "iconVisual":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/application-icon-83.png"
- }
- }
- }
- }
}
}
}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "includes":
+ [
+ "{APPLICATION_RESOURCE_PATH}/style/base-theme.json"
+ ],
+
+ "styles":
+ {
+ "DemoTile":
+ {
+ "styles": ["DemoTileBase"],
+ "states":
+ {
+ "NORMAL":
+ {
+ "color":[0.9, 0.4, 0.4, 0.6]
+ }
+ }
+ },
+
+ "LauncherBackground":
+ {
+ "background":
+ {
+ "visualType": "GRADIENT",
+ "center": [240, 400],
+ "radius": 932,
+ "units": "USER_SPACE",
+ "stopColor": [[0,0,0,1.0],[0.556863,0.054902,0,1.0]]
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "styles":
+ {
+ "CustomPopupStyle":{
+ "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
+ "popupBackgroundBorder":[0,4,4,0],
+ "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
+ "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
+ "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
+ "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
+ },
+
+ "DemoTileBase":
+ {
+ "states":
+ {
+ "NORMAL":
+ {
+ "color":[0.4, 0.6, 0.9, 0.6],
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture.9.png",
+// TILE_BACKGROUND_ALPHA
+// This shader takes a texture.
+// An alpha discard is performed.
+// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
+ "shader":
+ {
+ "fragmentShader":[
+ " varying mediump vec2 vTexCoord;",
+ " uniform lowp vec4 uColor;",
+ " uniform sampler2D sTexture;",
+ " uniform mediump vec3 uCustomPosition;",
+ "",
+ " void main()",
+ " {",
+ " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
+ " {",
+ " discard;",
+ " }",
+ "",
+ " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
+ " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
+ " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
+ "",
+ " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
+ " }"
+ ]
+ }
+ }
+ }
+ },
+ "FOCUSED":
+ {
+ "color":[0.3, 0.5, 0.8, 0.5],
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture-focused.9.png",
+// TILE_BACKGROUND_ALPHA
+// This shader takes a texture.
+// An alpha discard is performed.
+// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
+ "shader":
+ {
+ "fragmentShader":[
+ " varying mediump vec2 vTexCoord;",
+ " uniform lowp vec4 uColor;",
+ " uniform sampler2D sTexture;",
+ " uniform mediump vec3 uCustomPosition;",
+ "",
+ " void main()",
+ " {",
+ " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
+ " {",
+ " discard;",
+ " }",
+ "",
+ " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
+ " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
+ " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
+ "",
+ " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
+ " }"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "FocusActor":
+ {
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/tile-focus.9.png"
+ }
+ }
+ },
+ "DemoTileBorder":
+ {
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND
+ }
+ }
+ },
+ "TextLabelRosemary":
+ {
+ "fontFamily":"Rosemary"
+ },
+ "TextLabel":
+ {
+ "fontStyle":{"weight":"normal"},
+ "pointSize":18
+ },
+ "TextLabelFontSize0":
+ {
+ "pointSize":8
+ },
+ "TextLabelFontSize1":
+ {
+ "pointSize":10
+ },
+ "TextLabelFontSize2":
+ {
+ "pointSize":15
+ },
+ "TextLabelFontSize3":
+ {
+ "pointSize":19
+ },
+ "TextLabelFontSize4":
+ {
+ "pointSize":25
+ },
+
+ "Launcherlabel":
+ {
+ "pointSize":8
+ },
+
+ "ToolbarLabel":
+ {
+ "pointSize":10
+ },
+
+ "BuilderLabel":
+ {
+ "pointSize":10
+ },
+
+ "ScrollView":
+ {
+ "overshootEffectColor":"B018"
+ },
+
+ "GroupLabel":
+ {
+ "pointSize":6
+ },
+
+ "ChangeLayoutButton":
+ {
+ "label":{
+ "pointSize":5
+ }
+ }
+ }
+}
/*
- * Copyright (c) 2000-2016 Samsung Electronics Co., Ltd
-
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*/
{
+ "includes":
+ [
+ "{APPLICATION_RESOURCE_PATH}/style/base-theme.json"
+ ],
+
"styles":
{
- "CustomPopupStyle":{
- "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
- "popupBackgroundBorder":[0,4,4,0],
- "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
- "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
- "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
- "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
- },
-
"DemoTile":
{
- "states":
- {
- "NORMAL":
- {
- "color":[0.4, 0.6, 0.9, 0.6],
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture.9.png",
-// TILE_BACKGROUND_ALPHA
-// This shader takes a texture.
-// An alpha discard is performed.
-// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
- "shader":
- {
- "fragmentShader":[
- " varying mediump vec2 vTexCoord;",
- " uniform lowp vec4 uColor;",
- " uniform sampler2D sTexture;",
- " uniform mediump vec3 uCustomPosition;",
- "",
- " void main()",
- " {",
- " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
- " {",
- " discard;",
- " }",
- "",
- " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
- " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
- " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
- "",
- " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
- " }"
- ]
- }
- }
- }
- },
- "FOCUSED":
- {
- "color":[0.3, 0.5, 0.8, 0.5],
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture-focused.9.png",
-// TILE_BACKGROUND_ALPHA
-// This shader takes a texture.
-// An alpha discard is performed.
-// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
- "shader":
- {
- "fragmentShader":[
- " varying mediump vec2 vTexCoord;",
- " uniform lowp vec4 uColor;",
- " uniform sampler2D sTexture;",
- " uniform mediump vec3 uCustomPosition;",
- "",
- " void main()",
- " {",
- " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
- " {",
- " discard;",
- " }",
- "",
- " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
- " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
- " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
- "",
- " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
- " }"
- ]
- }
- }
- }
- }
- }
- },
- "FocusActor":
- {
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/tile-focus.9.png"
- }
- }
- },
- "DemoTileBorder":
- {
- "visuals":
- {
- "image":
- {
- "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND
- }
- }
- },
- "TextLabelRosemary":
- {
- "fontFamily":"Rosemary"
- },
- "TextLabel":
- {
- "fontStyle":{"weight":"normal"},
- "pointSize":18
- },
- "TextLabelFontSize0":
- {
- "pointSize":8
- },
- "TextLabelFontSize1":
- {
- "pointSize":10
- },
- "TextLabelFontSize2":
- {
- "pointSize":15
- },
- "TextLabelFontSize3":
- {
- "pointSize":19
- },
- "TextLabelFontSize4":
- {
- "pointSize":25
- },
-
- "Launcherlabel":
- {
- "pointSize":8
- },
-
- "ToolbarLabel":
- {
- "pointSize":10
- },
-
- "BuilderLabel":
- {
- "pointSize":10
- },
-
- "ScrollView":
- {
- "overshootEffectColor":"B018"
- },
-
- "GroupLabel":
- {
- "pointSize":6
+ "styles":[ "DemoTileBase" ]
},
"LauncherBackground":
"units": "USER_SPACE",
"stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
}
- },
-
- "ChangeLayoutButton":
- {
- "label":{
- "pointSize":5
- }
}
}
}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "includes":
+ [
+ "{APPLICATION_RESOURCE_PATH}/style/base-theme.json"
+ ],
+
+ "styles":
+ {
+ "DemoTile":
+ {
+ "styles": ["DemoTileBase"],
+ "states":
+ {
+ "NORMAL":
+ {
+ "color":[0.9, 0.4, 0.4, 0.6]
+ }
+ }
+ },
+
+ "LauncherBackground":
+ {
+ "background":
+ {
+ "visualType": "GRADIENT",
+ "center": [360, 640],
+ "radius": 1468,
+ "units": "USER_SPACE",
+ "stopColor": [[0,0,0,1.0],[0.556863,0.054902,0,1.0]]
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "includes":
+ [
+ "{APPLICATION_RESOURCE_PATH}/style/base-theme.json"
+ ],
+
+ "styles":
+ {
+ "DemoTile":
+ {
+ "styles": ["DemoTileBase"],
+ "states":
+ {
+ "NORMAL":
+ {
+ "color":[0.6, 0.4, 0.9, 0.6]
+ }
+ }
+ },
+
+ "LauncherBackground":
+ {
+ "background":
+ {
+ "visualType": "GRADIENT",
+ "center": [360, 640],
+ "radius": 1468,
+ "units": "USER_SPACE",
+ "stopColor": [[0.392157,0.254902,0.647059,1.0],[0.164706,0.0313725,0.270588,1.0]]
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "includes":
+ [
+ "{APPLICATION_RESOURCE_PATH}/style/base-theme.json"
+ ],
+
+ "styles":
+ {
+ "DemoTile":
+ {
+ "styles": ["DemoTileBase"],
+ "states":
+ {
+ "NORMAL":
+ {
+ "color":[0.6, 0.4, 0.9, 0.6]
+ }
+ }
+ },
+
+ "LauncherBackground":
+ {
+ "background":
+ {
+ "visualType": "GRADIENT",
+ "center": [240, 400],
+ "radius": 932,
+ "units": "USER_SPACE",
+ "stopColor": [[0.392157,0.254902,0.647059,1.0],[0.164706,0.0313725,0.270588,1.0]]
+ }
+ }
+ }
+}
const int NUMBER_OF_SHAPE_IMAGES( sizeof( SHAPE_IMAGE_TABLE ) / sizeof( SHAPE_IMAGE_TABLE[0] ) );
const int NUM_BACKGROUND_IMAGES = 18;
-const float BACKGROUND_SWIPE_SCALE = 0.025f;
const float BACKGROUND_SPREAD_SCALE = 1.5f;
-const float SCALE_MOD = 1000.0f * Math::PI * 2.0f;
-const float SCALE_SPEED = 10.0f;
-const float SCALE_SPEED_SIN = 0.1f;
const unsigned int BACKGROUND_ANIMATION_DURATION = 15000; // 15 secs
-const Vector4 BACKGROUND_COLOR( 0.3569f, 0.5451f, 0.7294f, 1.0f );
-
const float BUBBLE_MIN_Z = -1.0;
const float BUBBLE_MAX_Z = 0.0f;
textdomain(DALI_DEMO_DOMAIN_LOCAL);
setlocale(LC_ALL, DEMO_LANG);
- Application app = Application::New(&argc, &argv, DEMO_THEME_PATH);
+ Application app = Application::New( &argc, &argv, DEMO_STYLE_DIR "/tests-theme.json" );
// Create the demo launcher
DaliTableView demo(app);