namespace
{
+const int DEFAULT_FONT_PIXEL_SIZE = 30; // Referred platform widget viewer evas
+
#define GET_LOCALE_TEXT(string) dgettext(PKGNAME, string)
#if defined(DEBUG_ENABLED)
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" );
+ mStateText.SetProperty( Toolkit::TextLabel::Property::POINT_SIZE, TextPixelToPointSize( DEFAULT_FONT_PIXEL_SIZE ) );
mPreviewActor.Add( mStateTextActor );
mStateTextActor.Add( mStateText );
}
}
+float WidgetView::TextPixelToPointSize( int pixelSize )
+{
+ Dali::Vector2 dpi = Dali::Stage::GetCurrent().GetDpi();
+ float meanDpi = (dpi.height + dpi.width) / 2.0f;
+
+ return (pixelSize * 72.0f) / meanDpi;
+}
+
} // namespace Internal
} // namespace WidgetView