From: Joogab Yun Date: Thu, 18 Oct 2018 06:00:32 +0000 (+0900) Subject: Revert "[Tizen] modifies match align for first sentence line direciton" X-Git-Tag: accepted/tizen/5.0/unified/20181106.070355~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fed24cb5c2cd9c4dcc301568573b1f17fe8e5b7;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Revert "[Tizen] modifies match align for first sentence line direciton" Change-Id: Id4061f06cd95685681f8a504a2b126df93471e93 --- 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.