struct wl_buffer* preBuffer;
+const char* const FONT_STYLE( "fontStyle" );
+const char* const TEXT_POINT_SIZE( "textPointSize" );
+const char* const TEXT_COLOR( "textColor" );
+
static void OnBufferUpdated( struct tizen_remote_surface *surface, uint32_t type, struct wl_buffer *buffer,
int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys,
const char *appid, const char *instance_id, const int pid, void *data)
case Dali::WidgetView::WidgetView::Property::PREVIEW:
{
bool previewEnabled;
+
if( value.Get( previewEnabled ) )
{
impl.ShowPreview( previewEnabled );
case Dali::WidgetView::WidgetView::Property::LOADING_TEXT:
{
bool textEnabled;
+ Property::Map map;
+
if( value.Get( textEnabled ) )
{
impl.ShowStateText( textEnabled );
}
+ else if( value.Get( map ) )
+ {
+ impl.SetLoadingTextPropertyMap( map );
+ }
break;
}
case Dali::WidgetView::WidgetView::Property::PERMANENT_DELETE:
mStateText.SetAnchorPoint( AnchorPoint::CENTER );
mStateText.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mStateText.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
+ mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Dali::Color::WHITE );
+ mStateText.SetProperty( Toolkit::TextLabel::Property::FONT_STYLE, "Bold" );
mPreviewActor.Add( mStateTextActor );
mStateTextActor.Add( mStateText );
mRemoteSurface = NULL;
}
+void WidgetView::SetLoadingTextPropertyMap( Property::Map map )
+{
+ if( mStateText )
+ {
+ Property::Value* fontStyle = map.Find( FONT_STYLE );
+ std::string style;
+
+ if( fontStyle && fontStyle->Get( style ) )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::FONT_STYLE, style );
+ }
+
+ Property::Value* textPointSize = map.Find( TEXT_POINT_SIZE );
+ float size = 0.f;
+
+ if( textPointSize && textPointSize->Get( size ) )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::POINT_SIZE, size );
+ }
+
+ Property::Value* textColor = map.Find( TEXT_COLOR );
+ Vector4 color;
+
+ if( textColor && textColor->Get( color ) )
+ {
+ mStateText.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, color );
+ }
+ }
+}
+
} // namespace Internal
} // namespace WidgetView