- // If we don't have a label, create one and set it up.
- // Note: The label text is set from the passed in property map after creation.
- mLabel = Toolkit::TextLabel::New();
- mLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
- mLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
- mLabel.SetParentOrigin( ParentOrigin::TOP_LEFT );
- mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-
- // todo DEBUG
- mLabel.SetProperty( Toolkit::Control::Property::BACKGROUND, Dali::Property::Map()
- .Add( Toolkit::Visual::Property::TYPE, Dali::Toolkit::Visual::COLOR )
- .Add( Toolkit::ColorVisual::Property::MIX_COLOR, Color::RED )
- );
-
- ResizePolicy::Type policy = Self().GetResizePolicy( Dimension::ALL_DIMENSIONS );
- if ( policy == ResizePolicy::USE_NATURAL_SIZE || policy == ResizePolicy::FIT_TO_CHILDREN )
- {
- mLabel.SetResizePolicy(ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- }
- else
- {
- // todo Can't set Text Label to USE_ASSIGNED_SIZE as causes a relayout in it whilst doing a relayout = error
- //mLabel.SetResizePolicy(ResizePolicy::USE_ASSIGNED_SIZE, Dimension::ALL_DIMENSIONS );
- }
- Self().Add( mLabel );
+ DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "MergeLabelProperties Visual already exists, retrieving existing map\n");
+ visual.CreatePropertyMap( outMap );
+ DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "MergeLabelProperties retrieved %d properties\n", outMap.Count() );