From 803fc4e52d3fc95261c5af0b05c25d6bf243bc00 Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Thu, 24 Jun 2021 17:20:09 +0900 Subject: [PATCH] Fix underline issue when PreeditStyle is REVERSE, HIGHLIGHT Even if it is PreeditStyle without underline, need to do UnderlineRuns for any markup underlines that may exist in text. Change-Id: I6920dde2c7be93583eef4adfa5c026a671fcbbf6 Signed-off-by: Bowon Ryu --- dali-toolkit/internal/text/text-controller-impl.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index a513d70..b8b6f31 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -922,8 +922,13 @@ bool Controller::Impl::UpdateModel(OperationsMask operationsRequired) colorRun.color = backgroundColor; colorRun.characterRun.characterIndex = attrData.startIndex + numberOfCommit; colorRun.characterRun.numberOfCharacters = numberOfIndices; - mModel->mLogicalModel->mColorRuns.PushBack(colorRun); + + //Mark-up processor case + if(mModel->mVisualModel->IsMarkupProcessorEnabled()) + { + CopyUnderlinedFromLogicalToVisualModels(false); + } break; } case Dali::InputMethodContext::PreeditStyle::HIGHLIGHT: @@ -933,6 +938,12 @@ bool Controller::Impl::UpdateModel(OperationsMask operationsRequired) backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices; backgroundColorRun.color = LIGHT_BLUE; mModel->mLogicalModel->mBackgroundColorRuns.PushBack(backgroundColorRun); + + //Mark-up processor case + if(mModel->mVisualModel->IsMarkupProcessorEnabled()) + { + CopyUnderlinedFromLogicalToVisualModels(false); + } break; } case Dali::InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_1: -- 2.7.4