[Tizen] bug fixed : Characters are truncated when HorizontalAlignment.End in 17/192217/3
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 30 Oct 2018 05:18:14 +0000 (14:18 +0900)
committerjoogab yun <joogab.yun@samsung.com>
Thu, 1 Nov 2018 02:09:18 +0000 (02:09 +0000)
commitf7c5362ccc3535a6a59b44213813af7807fd7075
tree343f87c3003db6d3eca82da11c98bf71986f6dfb
parent2bc8d2f156bbccf75b1422e57d8aad605283da6a
[Tizen] bug fixed : Characters are truncated when HorizontalAlignment.End in
Multi line text on RTL environment.

Recalculate the alignmentOffset only if the line is RTL.

We need to distinguish the RTL variable for alignment and the RTL variable for the text line for position offset. So the RTL check of the text line is called isLineRTL.

ex)
When running the sample app below, the characters are truncated.

 Stage stage = Stage::GetCurrent();
 stage.SetBackgroundColor( Color::WHITE );

 TextLabel label = TextLabel::New( "Music, Film & TV, Funny, News,
Sports... Access millions of user generaed content and professional
videos from DAILYMOTION website on your SAMSUNG TV.Search, browse and
watch, get a direct access to your own or favorite accounts, watch a
selection of best" );
 label.SetSize( 1250, 600 );
 label.SetParentOrigin(ParentOrigin::TOP_LEFT);
 label.SetAnchorPoint(AnchorPoint::TOP_LEFT);
 label.SetPosition( 100.f, 700.f);
 label.SetProperty( TextLabel::Property::MULTI_LINE, true );
 label.SetProperty(TextLabel::Property::POINT_SIZE, 30);
 label.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT,
"END");
 label.SetProperty(Toolkit::DevelTextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION,
true );
 label.SetProperty( Actor::Property::LAYOUT_DIRECTION,
LayoutDirection::RIGHT_TO_LEFT );

 stage.Add( label );

Change-Id: I0c1161330de073cef466d8e7119a56a9be606034
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Layout.cpp
dali-toolkit/internal/text/layouts/layout-engine.cpp