X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=fd0bcaed52fcfeeb52d5ca4dbda961202d58eff6;hb=62fdadefe148bf9a5bc7557be6ab001ea1e0a453;hp=1c314492fbffbd50cd73aa3807e0cf70ad10b0f3;hpb=3480a42d70353c1975e53f07a492cf12cdd76578;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 1c31449..fd0bcae 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -23,6 +23,7 @@ #include // INTERNAL INCLUDES +#include #include #include #include @@ -148,10 +149,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr const std::string fontFamily = value.Get< std::string >(); DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel::SetProperty Property::FONT_FAMILY newFont(%s)\n", fontFamily.c_str() ); - if( impl.mController->GetDefaultFontFamily() != fontFamily ) - { - impl.mController->SetDefaultFontFamily( fontFamily, true ); - } + impl.mController->SetDefaultFontFamily( fontFamily ); } break; } @@ -284,7 +282,7 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr if( impl.mController ) { float height = value.Get< float >(); - if ( impl.mController->GetUnderlineHeight() != height ) + if( fabsf( impl.mController->GetUnderlineHeight() - height ) > Math::MACHINE_EPSILON_1000 ) { impl.mController->SetUnderlineHeight( height ); impl.mRenderer.Reset(); @@ -445,7 +443,10 @@ void TextLabel::OnInitialize() // Enable the text ellipsis. LayoutEngine& engine = mController->GetLayoutEngine(); + engine.SetTextEllipsisEnabled( true ); + engine.SetCursorWidth( 0u ); // Do not layout space for the cursor. + self.OnStageSignal().Connect( this, &TextLabel::OnStageConnect ); } @@ -518,7 +519,7 @@ void TextLabel::RenderText() Actor renderableActor; if( mRenderer ) { - renderableActor = mRenderer->Render( mController->GetView(), self.GetHierarchyDepth() ); + renderableActor = mRenderer->Render( mController->GetView(), TEXT_DEPTH_INDEX ); } if( renderableActor != mRenderableActor )