From b76ebb08792ed1b4dd05635c90a793219ba21f3d Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Tue, 22 Feb 2022 14:22:53 +0900 Subject: [PATCH] Add underline to anchor in the markup processor With a recent change, the underline run provides a color property. So, now we can support color underline for text anchor style. Change-Id: I9068a7733c1031b60625cb8fb356ac189aa4ae35 Signed-off-by: Bowon Ryu --- dali-toolkit/internal/text/markup-processor.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/markup-processor.cpp b/dali-toolkit/internal/text/markup-processor.cpp index 17aae96..6180699 100644 --- a/dali-toolkit/internal/text/markup-processor.cpp +++ b/dali-toolkit/internal/text/markup-processor.cpp @@ -966,7 +966,13 @@ void ProcessMarkupString(const std::string& markupString, MarkupProcessData& mar run.color = Color::BLUE; ProcessColorTag(tag, run); }); - /* TODO - underline */ + /* Underline */ + ProcessTagForRun( + markupProcessData.underlinedCharacterRuns, styleStack, tag, characterIndex, underlinedCharacterRunIndex, uTagReference, [](const Tag& tag, UnderlinedCharacterRun& run) { + run.properties.color = Color::BLUE; + run.properties.colorDefined = true; + ProcessUnderlineTag(tag, run); + }); } // tizen else if(TokenComparison(XHTML_SHADOW_TAG, tag.buffer, tag.length)) { -- 2.7.4