X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=f946cf25b7ea8965335332df295178ed99464013;hp=ce08f89473c2c5b438aeb499e0bc00439736fc37;hb=fa3449165ecd68eeca9f07ca6abf0b56f3477d9e;hpb=766fdcbec7da7e0bcdc4964c56211b195b257c16 diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index ce08f89..f946cf2 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -19,14 +19,12 @@ #include // EXTERNAL INCLUDES -#include #include -#include #include // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -158,15 +156,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr } case Toolkit::TextLabel::Property::FONT_STYLE: { - if( impl.mController ) - { - const std::string fontStyle = value.Get< std::string >(); - - if( impl.mController->GetDefaultFontStyle() != fontStyle ) - { - impl.mController->SetDefaultFontStyle( fontStyle ); - } - } + SetFontStyleProperty( impl.mController, value ); break; } case Toolkit::TextLabel::Property::POINT_SIZE: @@ -341,10 +331,7 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde } case Toolkit::TextLabel::Property::FONT_STYLE: { - if( impl.mController ) - { - value = impl.mController->GetDefaultFontStyle(); - } + GetFontStyleProperty( impl.mController, value ); break; } case Toolkit::TextLabel::Property::POINT_SIZE: @@ -471,11 +458,9 @@ void TextLabel::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange:: case StyleChange::DEFAULT_FONT_CHANGE: { DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel::OnStyleChange StyleChange::DEFAULT_FONT_CHANGE\n"); - if ( mController->GetDefaultFontFamily() == "" ) - { - // Property system did not set the font so should update it. - // todo instruct text-controller to update model - } + // Property system did not set the font so should update it. + std::string newFont = styleManager.GetDefaultFontFamily(); + mController->UpdateAfterFontChange( newFont ); break; }