Commit 6332cbff481a789257e6e935d6f0443d7cf2f904

Authored by Adeel Kazmi
1 parent 00f02c1c

Change the color of the bubbles for each launcher from stylesheet

Change-Id: Ie08b84b8e2cb9687c866ad1386ea606a16dd2d6e
resources/style/demo-theme.json.in
... ... @@ -38,6 +38,27 @@
38 38 "units": "USER_SPACE",
39 39 "stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
40 40 }
  41 + },
  42 +
  43 + "BubbleColor1":
  44 + {
  45 + "color": [ 0.3255, 0.3412, 0.6353, 0.32 ]
  46 + },
  47 +
  48 + "BubbleColor2":
  49 + {
  50 + "color": [ 0.3647, 0.7569, 0.8157, 0.32 ]
  51 + },
  52 +
  53 + "BubbleColor3":
  54 + {
  55 + "color": [ 0.3804, 0.7412, 0.6510, 0.32 ]
  56 + },
  57 +
  58 + "BubbleColor4":
  59 + {
  60 + "color": [ 1, 1, 1, 0.13 ]
41 61 }
  62 +
42 63 }
43 64 }
... ...
resources/style/examples-theme.json.in
... ... @@ -45,6 +45,27 @@
45 45 "units": "USER_SPACE",
46 46 "stopColor": [[0,0,0,1.0],[0.556863,0.054902,0,1.0]]
47 47 }
  48 + },
  49 +
  50 + "BubbleColor1":
  51 + {
  52 + "color": [ 0.8255, 0.2412, 0.1353, 0.32 ]
  53 + },
  54 +
  55 + "BubbleColor2":
  56 + {
  57 + "color": [ 0.8647, 0.4569, 0.3157, 0.32 ]
  58 + },
  59 +
  60 + "BubbleColor3":
  61 + {
  62 + "color": [ 0.9804, 0.5412, 0.5510, 0.32 ]
  63 + },
  64 +
  65 + "BubbleColor4":
  66 + {
  67 + "color": [ 1, 0, 0, 0.13 ]
48 68 }
  69 +
49 70 }
50 71 }
... ...
resources/style/mobile/demo-theme.json.in
... ... @@ -38,6 +38,27 @@
38 38 "units": "USER_SPACE",
39 39 "stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
40 40 }
  41 + },
  42 +
  43 + "BubbleColor1":
  44 + {
  45 + "color": [ 0.3255, 0.3412, 0.6353, 0.32 ]
  46 + },
  47 +
  48 + "BubbleColor2":
  49 + {
  50 + "color": [ 0.3647, 0.7569, 0.8157, 0.32 ]
  51 + },
  52 +
  53 + "BubbleColor3":
  54 + {
  55 + "color": [ 0.3804, 0.7412, 0.6510, 0.32 ]
  56 + },
  57 +
  58 + "BubbleColor4":
  59 + {
  60 + "color": [ 1, 1, 1, 0.13 ]
41 61 }
  62 +
42 63 }
43 64 }
... ...
resources/style/mobile/examples-theme.json.in
... ... @@ -45,6 +45,27 @@
45 45 "units": "USER_SPACE",
46 46 "stopColor": [[0,0,0,1.0],[0.556863,0.054902,0,1.0]]
47 47 }
  48 + },
  49 +
  50 + "BubbleColor1":
  51 + {
  52 + "color": [ 0.8255, 0.2412, 0.1353, 0.32 ]
  53 + },
  54 +
  55 + "BubbleColor2":
  56 + {
  57 + "color": [ 0.8647, 0.4569, 0.3157, 0.32 ]
  58 + },
  59 +
  60 + "BubbleColor3":
  61 + {
  62 + "color": [ 0.9804, 0.5412, 0.5510, 0.32 ]
  63 + },
  64 +
  65 + "BubbleColor4":
  66 + {
  67 + "color": [ 1, 0, 0, 0.13 ]
48 68 }
  69 +
49 70 }
50 71 }
... ...
resources/style/mobile/tests-theme.json.in
... ... @@ -44,6 +44,27 @@
44 44 "units": "USER_SPACE",
45 45 "stopColor": [[0.392157,0.254902,0.647059,1.0],[0.164706,0.0313725,0.270588,1.0]]
46 46 }
  47 + },
  48 +
  49 + "BubbleColor1":
  50 + {
  51 + "color": [ 0.8255, 0.2412, 0.9353, 0.32 ]
  52 + },
  53 +
  54 + "BubbleColor2":
  55 + {
  56 + "color": [ 0.8647, 0.4569, 0.8157, 0.32 ]
  57 + },
  58 +
  59 + "BubbleColor3":
  60 + {
  61 + "color": [ 0.9804, 0.5412, 0.9510, 0.32 ]
  62 + },
  63 +
  64 + "BubbleColor4":
  65 + {
  66 + "color": [ 1, 1, 1, 0.13 ]
47 67 }
  68 +
48 69 }
49 70 }
... ...
resources/style/tests-theme.json.in
... ... @@ -44,6 +44,27 @@
44 44 "units": "USER_SPACE",
45 45 "stopColor": [[0.392157,0.254902,0.647059,1.0],[0.164706,0.0313725,0.270588,1.0]]
46 46 }
  47 + },
  48 +
  49 + "BubbleColor1":
  50 + {
  51 + "color": [ 0.8255, 0.2412, 0.9353, 0.32 ]
  52 + },
  53 +
  54 + "BubbleColor2":
  55 + {
  56 + "color": [ 0.8647, 0.4569, 0.8157, 0.32 ]
  57 + },
  58 +
  59 + "BubbleColor3":
  60 + {
  61 + "color": [ 0.9804, 0.5412, 0.9510, 0.32 ]
  62 + },
  63 +
  64 + "BubbleColor4":
  65 + {
  66 + "color": [ 1, 1, 1, 0.13 ]
47 67 }
  68 +
48 69 }
49 70 }
... ...
shared/dali-table-view.cpp
... ... @@ -69,15 +69,14 @@ const float EFFECT_SNAP_DURATION = 0.66f; ///< Scroll Snap
69 69 const float EFFECT_FLICK_DURATION = 0.5f; ///< Scroll Flick Duration for Effects
70 70 const Vector3 ANGLE_CUBE_PAGE_ROTATE(Math::PI * 0.5f, Math::PI * 0.5f, 0.0f);
71 71  
72   -
73   -const Vector4 BUBBLE_COLOR[] =
  72 +const char * const BUBBLE_COLOR_STYLE_NAME[] =
74 73 {
75   - Vector4( 0.3255f, 0.3412f, 0.6353f, 0.32f ),
76   - Vector4( 0.3647f, 0.7569f, 0.8157f, 0.32f ),
77   - Vector4( 0.3804f, 0.7412f, 0.6510f, 0.32f ),
78   - Vector4( 1.f, 1.f, 1.f, 0.13f )
  74 + "BubbleColor1",
  75 + "BubbleColor2",
  76 + "BubbleColor3",
  77 + "BubbleColor4"
79 78 };
80   -const int NUMBER_OF_BUBBLE_COLOR( sizeof(BUBBLE_COLOR) / sizeof(BUBBLE_COLOR[0]) );
  79 +const int NUMBER_OF_BUBBLE_COLORS( sizeof( BUBBLE_COLOR_STYLE_NAME ) / sizeof( BUBBLE_COLOR_STYLE_NAME[ 0 ] ) );
81 80  
82 81 const char * const SHAPE_IMAGE_TABLE[] =
83 82 {
... ... @@ -750,7 +749,7 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count )
750 749 imageMap.Add( Toolkit::Visual::Property::SHADER, effect );
751 750 dfActor.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
752 751  
753   - dfActor.SetColor( BUBBLE_COLOR[ i%NUMBER_OF_BUBBLE_COLOR ] );
  752 + dfActor.SetStyleName( BUBBLE_COLOR_STYLE_NAME[ i%NUMBER_OF_BUBBLE_COLORS ] );
754 753  
755 754 layer.Add( dfActor );
756 755 }
... ...