From: Joogab Yun Date: Tue, 25 Aug 2020 08:59:40 +0000 (+0900) Subject: If the size of the text is larger than the size of the control, X-Git-Tag: dali_1.9.27~3^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=refs%2Fchanges%2F60%2F242260%2F1;ds=sidebyside If the size of the text is larger than the size of the control, setting it to VerticalAlignment::Center cuts the top and bottom of the text. The VerticalAlignment::CENTER setting works when the size of the control is enough. Change-Id: I3d35b4dfceb4297c89bddfc5c5364de4be5bc646 --- diff --git a/dali-toolkit/internal/text/rendering/text-typesetter.cpp b/dali-toolkit/internal/text/rendering/text-typesetter.cpp index 5b424be..0256a43 100755 --- a/dali-toolkit/internal/text/rendering/text-typesetter.cpp +++ b/dali-toolkit/internal/text/rendering/text-typesetter.cpp @@ -337,6 +337,7 @@ PixelData Typesetter::Render( const Vector2& size, Toolkit::DevelText::TextDirec case VerticalAlignment::CENTER: { penY = static_cast( 0.5f * ( size.height - layoutSize.height ) ); + penY = penY < 0.f ? 0.f : penY; break; } case VerticalAlignment::BOTTOM: