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")
{
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 );
const Vector2 stageSize = Stage::GetCurrent().GetSize();
// Background
- Control background = CreateBackground( "launcherbackground" );
+ Control background = CreateBackground( "LauncherBackground" );
Stage::GetCurrent().Add( background );
// Add root actor
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" );
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
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[] =
{
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 ) );
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 ) );
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 );
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 );
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 );
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 );
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 ) );
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 );
{
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 );
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" );
{
"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":
{
{
"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":
{
{
"styles":
{
- "title":{
+ "Title":{
"textColor":"#0000ff",
"background":
{
"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"]
}
}
{
"styles":
{
- "title":{
+ "Title":{
"textColor":"#0000ff",
"background":
{
"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]
}
}
},
"styles":
{
- "title":{
+ "Title":{
"textColor":"#0000ff",
"background":
{
"mixColor": [ 1.0, 1.0, 1.0, 1.0 ]
}
},
- "tableview":{
+ "TableView":{
"background":
{
"visualType":"GRADIENT",
},
// 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"
{
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" );
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 );