From 7fed24cb5c2cd9c4dcc301568573b1f17fe8e5b7 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Thu, 18 Oct 2018 15:00:32 +0900 Subject: [PATCH] Revert "[Tizen] modifies match align for first sentence line direciton" Change-Id: Id4061f06cd95685681f8a504a2b126df93471e93 --- dali-toolkit/internal/text/layouts/layout-engine.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index 99eda82..0c3d9df 100755 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -1111,9 +1111,6 @@ struct Engine::Impl const CharacterIndex lastCharacterPlusOne = startIndex + numberOfCharacters; alignmentOffset = MAX_FLOAT; - - const bool firstLineDirection = matchSystemLanguageDirection == true ? lines.Begin()->direction : false; - // Traverse all lines and align the glyphs. for( Vector::Iterator it = lines.Begin(), endIt = lines.End(); it != endIt; @@ -1139,8 +1136,7 @@ struct Engine::Impl horizontalAlignment, line, layoutDirection, - matchSystemLanguageDirection, - firstLineDirection ); + matchSystemLanguageDirection ); // Updates the alignment offset. alignmentOffset = std::min( alignmentOffset, line.alignmentOffset ); @@ -1151,18 +1147,17 @@ struct Engine::Impl HorizontalAlignment::Type horizontalAlignment, LineRun& line, Dali::LayoutDirection::Type layoutDirection, - bool matchSystemLanguageDirection, - const bool firstLineDirection ) + bool matchSystemLanguageDirection ) { line.alignmentOffset = 0.f; bool isRTL = RTL == line.direction; float lineLength = line.width; HorizontalAlignment::Type alignment = horizontalAlignment; - // match align for first line direction and system language direction + // match align for system language direction if( matchSystemLanguageDirection ) { - isRTL = ( ( RTL == firstLineDirection ) && ( layoutDirection == LayoutDirection::RIGHT_TO_LEFT ) ); + isRTL = layoutDirection == LayoutDirection::RIGHT_TO_LEFT; } // Swap the alignment type if the line is right to left. -- 2.7.4