From: joogab yun Date: Thu, 24 Jun 2021 09:34:15 +0000 (+0000) Subject: Merge "Change MatchSystemLanguageDirection is true." into devel/master X-Git-Tag: dali_2.0.32~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=93ad73e0e2c46aca4c191a1e2f075061e167e8b5;hp=-c Merge "Change MatchSystemLanguageDirection is true." into devel/master --- 93ad73e0e2c46aca4c191a1e2f075061e167e8b5 diff --combined automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp index 9f77f91,918e9cc..6028e02 --- a/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp +++ b/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp @@@ -112,8 -112,7 +112,8 @@@ void CreateTextModel( const std::string logicalModel->mFontDescriptionRuns, logicalModel->mEmbeddedItems, logicalModel->mAnchors, - logicalModel->mUnderlinedCharacterRuns); + logicalModel->mUnderlinedCharacterRuns, + logicalModel->mBackgroundColorRuns); Length textSize = 0u; const uint8_t* utf8 = NULL; @@@ -383,6 -382,9 +383,9 @@@ void ConfigureTextLabel( ControllerPtr // Enable the text elide. controller->SetTextElideEnabled( true ); + + // Disable match system language direction + controller->SetMatchSystemLanguageDirection(false); } void ConfigureTextField( ControllerPtr controller ) @@@ -412,6 -414,9 +415,9 @@@ // Disable the text elide. controller->SetTextElideEnabled( false ); + + // Disable match system language direction + controller->SetMatchSystemLanguageDirection(false); } void ConfigureTextEditor( ControllerPtr controller ) @@@ -441,6 -446,9 +447,9 @@@ // Disable the text elide. controller->SetTextElideEnabled( false ); + + // Disable match system language direction + controller->SetMatchSystemLanguageDirection(false); } } // namespace Text diff --combined dali-toolkit/internal/text/text-model.cpp index 26a9be8,8565eb3..3868979 --- a/dali-toolkit/internal/text/text-model.cpp +++ b/dali-toolkit/internal/text/text-model.cpp @@@ -18,12 -18,20 +18,20 @@@ // CLASS HEADER #include + // EXTERNAL INCLUDES + #include + namespace Dali { namespace Toolkit { namespace Text { + namespace + { + const char* DALI_ENV_MATCH_SYSTEM_LANGUAGE_DIRECTION("DALI_MATCH_SYSTEM_LANGUAGE_DIRECTION"); + } + ModelPtr Model::New() { return ModelPtr(new Model()); @@@ -119,11 -127,6 +127,11 @@@ const ColorIndex* const Model::GetBackg return mVisualModel->mBackgroundColorIndices.Begin(); } +bool const Model::IsMarkupBackgroundColorSet() const +{ + return (mVisualModel->mBackgroundColorIndices.Count() > 0); +} + const Vector4& Model::GetDefaultColor() const { return mVisualModel->mTextColor; @@@ -221,10 -224,14 +229,14 @@@ Model::Model( mAlignmentOffset(0.0f), mElideEnabled(false), mIgnoreSpacesAfterText(true), - mMatchSystemLanguageDirection(false) + mMatchSystemLanguageDirection(true) { mLogicalModel = LogicalModel::New(); mVisualModel = VisualModel::New(); + + // Check environment variable for DALI_MATCH_SYSTEM_LANGUAGE_DIRECTION + auto match = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_MATCH_SYSTEM_LANGUAGE_DIRECTION); + mMatchSystemLanguageDirection = match ? (std::atoi(match) == 0 ? false : true) : mMatchSystemLanguageDirection; } Model::~Model()