Commit b4635bf3b7087a66bbc5e31b94db6d3f4aac0641
1 parent
8f5c83c7
Updated mobile stylesheet for demo
Change-Id: I91d6b400adb0e1b5262a1ca255ac32ca07945154 Signed-off-by: David Steele <david.steele@samsung.com>
Showing
2 changed files
with
106 additions
and
22 deletions
resources/style/demo-theme.json.in
| ... | ... | @@ -124,30 +124,11 @@ |
| 124 | 124 | }, |
| 125 | 125 | "DemoTileBorder": |
| 126 | 126 | { |
| 127 | - "states": | |
| 127 | + "visuals": | |
| 128 | 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": | |
| 129 | + "image": | |
| 140 | 130 | { |
| 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 | - } | |
| 131 | + "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND | |
| 151 | 132 | } |
| 152 | 133 | } |
| 153 | 134 | }, | ... | ... |
resources/style/mobile/demo-theme.json.in
| ... | ... | @@ -26,6 +26,109 @@ |
| 26 | 26 | "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png", |
| 27 | 27 | "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png" |
| 28 | 28 | }, |
| 29 | + | |
| 30 | + "DemoTile": | |
| 31 | + { | |
| 32 | + "states": | |
| 33 | + { | |
| 34 | + "NORMAL": | |
| 35 | + { | |
| 36 | + "color":[0.4, 0.6, 0.9, 0.6], | |
| 37 | + "visuals": | |
| 38 | + { | |
| 39 | + "image": | |
| 40 | + { | |
| 41 | + "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture.9.png", | |
| 42 | +// TILE_BACKGROUND_ALPHA | |
| 43 | +// This shader takes a texture. | |
| 44 | +// An alpha discard is performed. | |
| 45 | +// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect. | |
| 46 | + "shader": | |
| 47 | + { | |
| 48 | + "fragmentShader":[ | |
| 49 | + " varying mediump vec2 vTexCoord;", | |
| 50 | + " uniform lowp vec4 uColor;", | |
| 51 | + " uniform sampler2D sTexture;", | |
| 52 | + " uniform mediump vec3 uCustomPosition;", | |
| 53 | + "", | |
| 54 | + " void main()", | |
| 55 | + " {", | |
| 56 | + " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )", | |
| 57 | + " {", | |
| 58 | + " discard;", | |
| 59 | + " }", | |
| 60 | + "", | |
| 61 | + " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );", | |
| 62 | + " mediump vec4 color = texture2D( sTexture, wrapTexCoord );", | |
| 63 | + " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;", | |
| 64 | + "", | |
| 65 | + " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );", | |
| 66 | + " }" | |
| 67 | + ] | |
| 68 | + } | |
| 69 | + } | |
| 70 | + } | |
| 71 | + }, | |
| 72 | + "FOCUSED": | |
| 73 | + { | |
| 74 | + "color":[0.3, 0.5, 0.8, 0.5], | |
| 75 | + "visuals": | |
| 76 | + { | |
| 77 | + "image": | |
| 78 | + { | |
| 79 | + "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture-focused.9.png", | |
| 80 | +// TILE_BACKGROUND_ALPHA | |
| 81 | +// This shader takes a texture. | |
| 82 | +// An alpha discard is performed. | |
| 83 | +// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect. | |
| 84 | + "shader": | |
| 85 | + { | |
| 86 | + "fragmentShader":[ | |
| 87 | + " varying mediump vec2 vTexCoord;", | |
| 88 | + " uniform lowp vec4 uColor;", | |
| 89 | + " uniform sampler2D sTexture;", | |
| 90 | + " uniform mediump vec3 uCustomPosition;", | |
| 91 | + "", | |
| 92 | + " void main()", | |
| 93 | + " {", | |
| 94 | + " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )", | |
| 95 | + " {", | |
| 96 | + " discard;", | |
| 97 | + " }", | |
| 98 | + "", | |
| 99 | + " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );", | |
| 100 | + " mediump vec4 color = texture2D( sTexture, wrapTexCoord );", | |
| 101 | + " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;", | |
| 102 | + "", | |
| 103 | + " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );", | |
| 104 | + " }" | |
| 105 | + ] | |
| 106 | + } | |
| 107 | + } | |
| 108 | + } | |
| 109 | + } | |
| 110 | + } | |
| 111 | + }, | |
| 112 | + "FocusActor": | |
| 113 | + { | |
| 114 | + "visuals": | |
| 115 | + { | |
| 116 | + "image": | |
| 117 | + { | |
| 118 | + "url":"{APPLICATION_RESOURCE_PATH}/images/tile-focus.9.png" | |
| 119 | + } | |
| 120 | + } | |
| 121 | + }, | |
| 122 | + "DemoTileBorder": | |
| 123 | + { | |
| 124 | + "visuals": | |
| 125 | + { | |
| 126 | + "image": | |
| 127 | + { | |
| 128 | + "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND | |
| 129 | + } | |
| 130 | + } | |
| 131 | + }, | |
| 29 | 132 | "TextLabelRosemary": |
| 30 | 133 | { |
| 31 | 134 | "fontFamily":"Rosemary" | ... | ... |