diff options
-rw-r--r-- | build/tizen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | demo/dali-table-view.cpp | 6 | ||||
-rw-r--r-- | examples/builder/examples.cpp | 2 | ||||
-rw-r--r-- | examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp | 11 | ||||
-rw-r--r-- | examples/styling/styling-application.cpp | 12 | ||||
-rw-r--r-- | examples/text-fonts/text-fonts-example.cpp | 2 | ||||
-rw-r--r-- | resources/style/demo-theme.json.in | 24 | ||||
-rw-r--r-- | resources/style/images/00_popup_bg.9.png | bin | 0 -> 1559 bytes | |||
-rw-r--r-- | resources/style/mobile/demo-theme.json.in | 28 | ||||
-rw-r--r-- | resources/style/style-example-theme-one.json.in | 32 | ||||
-rw-r--r-- | resources/style/style-example-theme-three.json.in | 22 | ||||
-rw-r--r-- | resources/style/style-example-theme-two.json.in | 20 | ||||
-rw-r--r-- | shared/view.h | 4 |
13 files changed, 83 insertions, 82 deletions
diff --git a/build/tizen/CMakeLists.txt b/build/tizen/CMakeLists.txt index d7bc8879..575f2b6a 100644 --- a/build/tizen/CMakeLists.txt +++ b/build/tizen/CMakeLists.txt @@ -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") diff --git a/demo/dali-table-view.cpp b/demo/dali-table-view.cpp index daebe612..474bdbb8 100644 --- a/demo/dali-table-view.cpp +++ b/demo/dali-table-view.cpp @@ -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" ); diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index e80c88b4..81aacafa 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -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 diff --git a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp index 7cdc4a60..f13617a3 100644 --- a/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp +++ b/examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp @@ -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 ); diff --git a/examples/styling/styling-application.cpp b/examples/styling/styling-application.cpp index b37279ce..c8859874 100644 --- a/examples/styling/styling-application.cpp +++ b/examples/styling/styling-application.cpp @@ -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 ); diff --git a/examples/text-fonts/text-fonts-example.cpp b/examples/text-fonts/text-fonts-example.cpp index 9cc4d8ee..be78963a 100644 --- a/examples/text-fonts/text-fonts-example.cpp +++ b/examples/text-fonts/text-fonts-example.cpp @@ -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" ); diff --git a/resources/style/demo-theme.json.in b/resources/style/demo-theme.json.in index 21e0f2ef..8cf572db 100644 --- a/resources/style/demo-theme.json.in +++ b/resources/style/demo-theme.json.in @@ -17,50 +17,52 @@ { "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 Binary files differnew file mode 100644 index 00000000..f0e84ff7 --- /dev/null +++ b/resources/style/images/00_popup_bg.9.png diff --git a/resources/style/mobile/demo-theme.json.in b/resources/style/mobile/demo-theme.json.in index 86a6b572..f8b5099c 100644 --- a/resources/style/mobile/demo-theme.json.in +++ b/resources/style/mobile/demo-theme.json.in @@ -18,67 +18,67 @@ { "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": { diff --git a/resources/style/style-example-theme-one.json.in b/resources/style/style-example-theme-one.json.in index e84d4237..29b628cf 100644 --- a/resources/style/style-example-theme-one.json.in +++ b/resources/style/style-example-theme-one.json.in @@ -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"] } } diff --git a/resources/style/style-example-theme-three.json.in b/resources/style/style-example-theme-three.json.in index c50ca226..f6feabb4 100644 --- a/resources/style/style-example-theme-three.json.in +++ b/resources/style/style-example-theme-three.json.in @@ -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] } } diff --git a/resources/style/style-example-theme-two.json.in b/resources/style/style-example-theme-two.json.in index 61c78a9b..77a8586c 100644 --- a/resources/style/style-example-theme-two.json.in +++ b/resources/style/style-example-theme-two.json.in @@ -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", @@ -58,11 +58,11 @@ }, // 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, @@ -75,19 +75,19 @@ }, "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" diff --git a/shared/view.h b/shared/view.h index cc7ca8f0..29e1012d 100644 --- a/shared/view.h +++ b/shared/view.h @@ -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 ); |