Fixed up styling following toolkit string comparison 72/84272/3
authorDavid Steele <david.steele@samsung.com>
Wed, 17 Aug 2016 18:32:36 +0000 (19:32 +0100)
committerDavid Steele <david.steele@partner.samsung.com>
Wed, 24 Aug 2016 14:37:22 +0000 (15:37 +0100)
Fixed style paths in build system for images
Changed style names in style sheets to use CamelCase for readability.

Change-Id: I094af8d27e7a8af23555a63e7b76df3e9e1993ec
Signed-off-by: David Steele <david.steele@samsung.com>
13 files changed:
build/tizen/CMakeLists.txt
demo/dali-table-view.cpp
examples/builder/examples.cpp
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
examples/styling/styling-application.cpp
examples/text-fonts/text-fonts-example.cpp
resources/style/demo-theme.json.in
resources/style/images/00_popup_bg.9.png [new file with mode: 0644]
resources/style/mobile/demo-theme.json.in
resources/style/style-example-theme-one.json.in
resources/style/style-example-theme-three.json.in
resources/style/style-example-theme-two.json.in
shared/view.h

index d7bc887..575f2b6 100644 (file)
@@ -56,7 +56,7 @@ SET(DEMO_EXAMPLE_BIN \\"${BINDIR}/\\")
 SET(DEMO_LOCALE_DIR \\"${LOCALE_DIR}\\")
 SET(DEMO_LANG \\"${LANG}\\")
 
-SET(DEMO_STYLE_IMAGE_DIR ${STYLE_DIR}images)
+SET(DEMO_STYLE_IMAGE_DIR ${STYLE_DIR}/images)
 
 FILE(GLOB LOCAL_IMAGES_PNG RELATIVE  "${LOCAL_IMAGES_DIR}" "${LOCAL_IMAGES_DIR}/*.png")
 FILE(GLOB LOCAL_IMAGES_JPG RELATIVE  "${LOCAL_IMAGES_DIR}" "${LOCAL_IMAGES_DIR}/*.jpg")
index daebe61..474bdbb 100644 (file)
@@ -90,7 +90,7 @@ Control CreateBackground( std::string stylename )
 {
   Control background = Control::New();
   Stage::GetCurrent().Add( background );
-  background.SetProperty( Control::Property::STYLE_NAME,stylename);
+  background.SetStyleName( stylename);
   background.SetName( "BACKGROUND" );
   background.SetAnchorPoint( AnchorPoint::CENTER );
   background.SetParentOrigin( ParentOrigin::CENTER );
@@ -185,7 +185,7 @@ void DaliTableView::Initialize( Application& application )
   const Vector2 stageSize = Stage::GetCurrent().GetSize();
 
   // Background
-  Control background = CreateBackground( "launcherbackground" );
+  Control background = CreateBackground( "LauncherBackground" );
   Stage::GetCurrent().Add( background );
 
   // Add root actor
@@ -464,7 +464,7 @@ Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
 
   TextLabel label = TextLabel::New();
   label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  label.SetProperty( Control::Property::STYLE_NAME, "launcherlabel" );
+  label.SetStyleName( "LauncherLabel" );
   label.SetProperty( TextLabel::Property::MULTI_LINE, true );
   label.SetProperty( TextLabel::Property::TEXT, title );
   label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
index e80c88b..81aacaf 100644 (file)
@@ -387,7 +387,7 @@ public:
   Actor MenuItem(const std::string& text)
   {
     TextLabel label = TextLabel::New( ShortName( text ) );
-    label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "builderlabel" );
+    label.SetStyleName( "BuilderLabel" );
     label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
 
     // Hook up tap detector
index 7cdc4a6..f13617a 100644 (file)
@@ -45,9 +45,8 @@ const char* const SAMPLING_BUTTON_ID = "SAMPLING_BUTTON";
 const char* const FITTING_BUTTON_TEXT = "Fitting";
 const char* const SAMPLING_BUTTON_TEXT = "Sampling";
 
-const char* const STYLE_LABEL_TEXT  = "grouplabel";
-const char* const STYLE_BUTTON_TEXT = "buttonlabel";
-
+const char* const STYLE_LABEL_TEXT  = "ImageScalingGroupLabel";
+const char* const STYLE_BUTTON_TEXT = "ImageScalingButton";
 
 const char* IMAGE_PATHS[] =
 {
@@ -336,7 +335,7 @@ public:
       fittingModeGroup.SetFitHeight( 1 );
 
       TextLabel label = TextLabel::New( "Image fitting mode:" );
-      label.SetProperty( Toolkit::Control::Property::STYLE_NAME, STYLE_LABEL_TEXT );
+      label.SetStyleName( STYLE_LABEL_TEXT );
       fittingModeGroup.Add( label );
 
       Toolkit::PushButton button = CreateButton( FITTING_BUTTON_ID, StringFromScalingMode( mFittingMode ) );
@@ -357,7 +356,7 @@ public:
       samplingModeGroup.SetFitHeight( 1 );
 
       TextLabel label = TextLabel::New( "Image sampling mode:" );
-      label.SetProperty( Toolkit::Control::Property::STYLE_NAME, STYLE_LABEL_TEXT );
+      label.SetStyleName( STYLE_LABEL_TEXT );
       samplingModeGroup.Add( label );
 
       Toolkit::PushButton button = CreateButton( SAMPLING_BUTTON_ID, StringFromFilterMode( mSamplingMode ) );
@@ -371,7 +370,7 @@ public:
   Toolkit::PushButton CreateButton( const char * id, const char * label )
   {
     Toolkit::PushButton button = Toolkit::PushButton::New();
-    button.SetProperty( Toolkit::Control::Property::STYLE_NAME, STYLE_BUTTON_TEXT );
+    button.SetStyleName( STYLE_BUTTON_TEXT );
     button.SetName( id );
     button.SetLabelText( label );
     button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
index b37279c..c885987 100644 (file)
@@ -135,7 +135,7 @@ void StylingApplication::Create( Application& application )
 
   mTitle = TextLabel::New( "Styling Example" );
   mTitle.SetName( "Title" );
-  mTitle.SetStyleName("title");
+  mTitle.SetStyleName("Title");
   mTitle.SetAnchorPoint( AnchorPoint::TOP_CENTER );
   mTitle.SetParentOrigin( ParentOrigin::TOP_CENTER );
   mTitle.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
@@ -246,7 +246,7 @@ void StylingApplication::Create( Application& application )
     channelSliderLayout.SetCellAlignment( TableView::CellPosition( i, 0 ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER );
 
     TextLabel label = TextLabel::New( checkboxLabels[i] );
-    std::ostringstream labelStyleName; labelStyleName << "colorLabel" << i+1;
+    std::ostringstream labelStyleName; labelStyleName << "ColorLabel" << i+1;
     label.SetName( labelStyleName.str() );
     label.SetStyleName( labelStyleName.str() );
     label.SetParentOrigin( ParentOrigin::CENTER );
@@ -258,7 +258,7 @@ void StylingApplication::Create( Application& application )
     channelSliderLayout.SetCellAlignment( TableView::CellPosition( i, 1 ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER );
 
     mChannelSliders[i] = Slider::New();
-    std::ostringstream sliderStyleName; sliderStyleName << "colorSlider" << i+1;
+    std::ostringstream sliderStyleName; sliderStyleName << "ColorSlider" << i+1;
     mChannelSliders[i].SetName( sliderStyleName.str() );
     mChannelSliders[i].SetStyleName( sliderStyleName.str() );
     mChannelSliders[i].SetParentOrigin( ParentOrigin::CENTER );
@@ -302,7 +302,7 @@ void StylingApplication::Create( Application& application )
 
   TextLabel label = TextLabel::New( "Theme: ");
   label.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
-  label.SetStyleName("themelabel");
+  label.SetStyleName("ThemeLabel");
   label.SetAnchorPoint( AnchorPoint::TOP_CENTER );
   label.SetParentOrigin( ParentOrigin::TOP_CENTER );
   themeButtonLayout.AddChild( label, TableView::CellPosition( 0, 0 ) );
@@ -386,7 +386,7 @@ Popup StylingApplication::CreateResetPopup()
 
   TextLabel text = TextLabel::New( "This will reset the channel data to full value. Are you sure?" );
   text.SetName( "PopupContentText" );
-  text.SetStyleName( "popupBody" );
+  text.SetStyleName( "PopupBody" );
   text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
   text.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
   text.SetProperty( TextLabel::Property::MULTI_LINE, true );
@@ -442,7 +442,7 @@ TextLabel StylingApplication::CreateTitle( std::string title )
 {
   TextLabel titleActor = TextLabel::New( title );
   titleActor.SetName( "titleActor" );
-  titleActor.SetStyleName( "popupTitle" );
+  titleActor.SetStyleName( "PopupTitle" );
   titleActor.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
   titleActor.SetProperty( TextLabel::Property::MULTI_LINE, false );
 
index 9cc4d8e..be78963 100644 (file)
@@ -185,7 +185,7 @@ public:
     CreateTextLabel ( mLabel, LABEL_TEXT, Color::WHITE  );
 
     CreateTextLabel ( mLabel2, LABEL_TEXT, Color::WHITE  );
-    mLabel2.SetStyleName("textlabel-Rosemary");
+    mLabel2.SetStyleName("TextLabelRosemary");
 
     CreateTextLabel ( mLabel3, LABEL_TEXT, Color::WHITE  );
     mLabel3.SetProperty( TextLabel::Property::FONT_FAMILY, "SamsungOneUI" );
index 21e0f2e..8cf572d 100644 (file)
 {
   "styles":
   {
-    "confirmationpopup":{
+    "ConfirmationPopup":{
       "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/00_popup_bg.9.png"
     },
 
-    "textlabel-Rosemary":
+    "TextLabelRosemary":
     {
       "fontFamily":"Rosemary"
     },
-    "textlabel":
+    "TextLabel":
     {
       "fontStyle":"Regular",
       "pointSize":18
     },
-    "launcherlabel":
+    "LauncherLabel":
     {
       "pointSize":18
     },
 
-    "toolbarlabel":
+    "ToolbarLabel":
     {
       "pointSize":18
     },
 
-    "builderlabel":
+    "BuilderLabel":
     {
       "pointSize":13
     },
 
-    "scrollview":
+    "ScrollView":
     {
       "overshootEffectColor":"B018"
     },
 
-    "grouplabel":
+    "ImageScalingGroupLabel":
     {
       "pointSize":9
     },
 
-    "buttonlabel":
+    "ImageScalingButton":
     {
-      "pointSize":11
+      "label":{
+        "pointSize":11
+      }
     },
 
-    "launcherbackground":
+    "LauncherBackground":
     {
       "background":
       {
diff --git a/resources/style/images/00_popup_bg.9.png b/resources/style/images/00_popup_bg.9.png
new file mode 100644 (file)
index 0000000..f0e84ff
Binary files /dev/null and b/resources/style/images/00_popup_bg.9.png differ
index 86a6b57..f8b5099 100644 (file)
 {
   "styles":
   {
-    "textlabel-Rosemary":
+    "TextLabelRosemary":
     {
       "fontFamily":"Rosemary"
     },
-    "textlabel":
+    "TextLabel":
     {
       "fontStyle":"Regular",
       "pointSize":18
     },
-    "textlabelFontSize0":
+    "TextLabelFontSize0":
     {
       "pointSize":8
     },
-    "textlabelFontSize1":
+    "TextLabelFontSize1":
     {
       "pointSize":10
     },
-    "textlabelFontSize2":
+    "TextLabelFontSize2":
     {
       "pointSize":15
     },
-    "textlabelFontSize3":
+    "TextLabelFontSize3":
     {
       "pointSize":19
     },
-    "textlabelFontSize4":
+    "TextLabelFontSize4":
     {
       "pointSize":25
     },
 
-    "launcherlabel":
+    "Launcherlabel":
     {
       "pointSize":8
     },
 
-    "toolbarlabel":
+    "ToolbarLabel":
     {
       "pointSize":10
     },
 
-    "builderlabel":
+    "BuilderLabel":
     {
       "pointSize":10
     },
 
-    "scrollview":
+    "ScrollView":
     {
       "overshootEffectColor":"B018"
     },
 
-    "grouplabel":
+    "GroupLabel":
     {
       "pointSize":6
     },
 
-    "buttonlabel":
+    "ButtonLabel":
     {
       "pointSize":8
     },
 
-    "launcherbackground":
+    "LauncherBackground":
     {
       "background":
       {
index e84d423..29b628c 100644 (file)
@@ -1,7 +1,7 @@
 {
   "styles":
   {
-    "title":{
+    "Title":{
       "textColor":"#0000ff",
       "background":
       {
@@ -9,58 +9,58 @@
         "mixColor": [ 1.0, 1.0, 1.0, 1.0 ]
       }
     },
-    "tableview":{
+    "TableView":{
       "background":
       {
         "visualType":"COLOR",
         "mixColor": [ 1.0, 1.0, 1.0, 0.03 ]
       }
     },
-    "flexcontainer":{
+    "FlexContainer":{
       "background":
       {
         "visualType":"COLOR",
         "mixColor": [ 1.0, 1.0, 1.0, 0.1 ]
       }
     },
-    "radiobutton":{
+    "RadioButton":{
       "label":{
         "textColor": [1,1,1,1]
       }
     },
-    "checkboxbutton":{
+    "CheckBoxButton":{
       "label":{
         "textColor": [1,1,1,1]
       }
     },
-    "colorLabel1":{
+    "ColorLabel1":{
       "textColor": [1,0,0,1]
     },
-    "colorLabel2":{
+    "ColorLabel2":{
       "textColor": [0,1,0,1]
     },
-    "colorLabel3":{
+    "ColorLabel3":{
       "textColor": [0.3,0.3,1,1]
     },
-    "themelabel":{
+    "ThemeLabel":{
       "textColor":[0,1,1,1]
     },
-    "popupTitle":{
+    "PopupTitle":{
       "textColor":[1,1,1,1]
     },
-    "popupBody":{
+    "PopupBody":{
       "textColor":[1,1,0,1]
     },
-    "textlabel":{
+    "TextLabel":{
       "textColor":[0,0,0,1]
     },
-    "colorSlider1":{
-      "styles":["slider"]
+    "ColorSlider1":{
+      "styles":["Slider"]
     },
-    "colorSlider2":{
+    "ColorSlider2":{
       "styles":["slider"]
     },
-    "colorSlider3":{
+    "ColorSlider3":{
       "styles":["slider"]
     }
   }
index c50ca22..f6feabb 100644 (file)
@@ -1,7 +1,7 @@
 {
   "styles":
   {
-    "title":{
+    "Title":{
       "textColor":"#0000ff",
       "background":
       {
@@ -9,42 +9,42 @@
         "mixColor": [ 1.0, 1.0, 1.0, 1.0 ]
       }
     },
-    "tableview":{
+    "TableView":{
       "background":
       {
         "visualType":"COLOR",
         "mixColor": [ 1.0, 1.0, 1.0, 0.03 ]
       }
     },
-    "radiobutton":{
+    "RadioButton":{
       "label":{
         "textColor": [1,1,1,1]
       }
     },
-    "checkboxbutton":{
+    "CheckboxButton":{
       "label":{
         "textColor": [1,1,1,1]
       }
     },
-    "colorLabel1":{
+    "ColorLabel1":{
       "textColor": [1,0,0,1]
     },
-    "colorLabel2":{
+    "ColorLabel2":{
       "textColor": [0,1,0,1]
     },
-    "colorLabel3":{
+    "ColorLabel3":{
       "textColor": [0.3,0.3,1,1]
     },
-    "themelabel":{
+    "ThemeLabel":{
       "textColor":[0,1,1,1]
     },
-    "popupTitle":{
+    "PopupTitle":{
       "textColor":[1,1,1,1]
     },
-    "popupBody":{
+    "PopupBody":{
       "textColor":[1,1,0,1]
     },
-    "textlabel":{
+    "TextLabel":{
       "textColor":[0,0,0,1]
     }
   }
index 61c78a9..77a8586 100644 (file)
@@ -5,7 +5,7 @@
   },
   "styles":
   {
-    "title":{
+    "Title":{
       "textColor":"#0000ff",
       "background":
       {
@@ -13,7 +13,7 @@
         "mixColor": [ 1.0, 1.0, 1.0, 1.0 ]
       }
     },
-    "tableview":{
+    "TableView":{
       "background":
       {
         "visualType":"GRADIENT",
@@ -24,7 +24,7 @@
     },
 
     // Change an icon size, see if it gets properly re-sized
-    "radiobutton":{
+    "RadioButton":{
       "unselectedStateImage":"{STYLE_DIR}/images/radio-button-unselected.png",
       "selectedStateImage":"{STYLE_DIR}/images/radio-button-selected.png",
       "disabledStateImage":"{STYLE_DIR}/images/radio-button-unselected-disabled.png",
     },
 
     // Note, this overrides any non-renamed label styles, e.g. those in a button.
-    "textlabel":{
+    "TextLabel":{
       //"textColor":[0,0,0,1]
     },
 
-    "thinslider":{
+    "ThinSlider":{
       "styles": ["slider"],
       "showPopup":true,
       "showValue":false,
       },
       "enabled":true
     },
-    "colorSlider1":{
-      "styles":["thinslider"],
+    "ColorSlider1":{
+      "styles":["ThinSlider"],
       "progressVisual":{
         "url":"{STYLE_DIR}/images/slider-skin-progress-red.9.png"
       }
     },
-    "colorSlider2":{
-      "styles":["thinslider"],
+    "ColorSlider2":{
+      "styles":["ThinSlider"],
       "progressVisual":{
         "url":"{STYLE_DIR}/images/slider-skin-progress-green.9.png"
       }
     },
-    "colorSlider3":{
+    "ColorSlider3":{
       "styles":["thinslider"],
       "progressVisual":{
         "url":"{STYLE_DIR}/images/slider-skin-progress-blue.9.png"
index cc7ca8f..29e1012 100644 (file)
@@ -94,7 +94,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar,
   {
     Dali::Toolkit::TextLabel label = Dali::Toolkit::TextLabel::New();
     label.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
-    label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "toolbarlabel" );
+    label.SetStyleName( "ToolbarLabel" );
     label.SetProperty( Dali::Toolkit::TextLabel::Property::TEXT, title );
     label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
     label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -168,7 +168,7 @@ Dali::Layer CreateView( Dali::Application& application,
 Dali::Toolkit::TextLabel CreateToolBarLabel( const std::string& text )
 {
   Dali::Toolkit::TextLabel label = Dali::Toolkit::TextLabel::New( text );
-  label.SetProperty( Dali::Toolkit::Control::Property::STYLE_NAME, "toolbarlabel" );
+  label.SetStyleName( "ToolbarLabel" );
   label.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
   label.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
   label.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::HEIGHT );