From: Evgen Servetnik Date: Wed, 6 Sep 2017 13:53:30 +0000 (+0300) Subject: TizenRefApp-9247 Fix color of highlighted recipients. X-Git-Tag: submit/tizen/20170906.154058^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7f1ccc59a33b53399c974d38268afd1fa070e35;p=profile%2Fwearable%2Fapps%2Fnative%2Fmessage.git TizenRefApp-9247 Fix color of highlighted recipients. Change-Id: Iffde1ef8b08b16f292387351bc456ca558c86287 Signed-off-by: Evgen Servetnik --- diff --git a/src/Common/Utils/inc/TextDecorator.h b/src/Common/Utils/inc/TextDecorator.h index 0aea38e..e889c48 100644 --- a/src/Common/Utils/inc/TextDecorator.h +++ b/src/Common/Utils/inc/TextDecorator.h @@ -36,6 +36,7 @@ namespace Msg { static const char *defaultColor; static const char *whiteColor; + static const char *matchColor; static const int defaultFontSize; public: diff --git a/src/Common/Utils/src/TextDecorator.cpp b/src/Common/Utils/src/TextDecorator.cpp index adb81ac..44cc0d4 100644 --- a/src/Common/Utils/src/TextDecorator.cpp +++ b/src/Common/Utils/src/TextDecorator.cpp @@ -24,6 +24,7 @@ using namespace Msg; const char *TextStyle::defaultColor = "#000000FF"; const char *TextStyle::whiteColor = "#FFFFFFFF"; +const char *TextStyle::matchColor = "#FFAE0DFF"; const int TextStyle::defaultFontSize = 28; #define OPEN_TAG_STR(name, str) "<" name "=" + str + ">" @@ -223,12 +224,12 @@ std::string highlightKeyword(std::string str, const std::string &searchWord, boo std::string firstPart = std::string(str.begin(), str.begin() + diff); std::string lastPart = std::string(str.begin() + diff + searchWord.length(), str.end()); + res += firstPart; - res += ""; + res += ""; res += std::string(found, searchWord.length()); - res += ""; + res += ""; res += lastPart; - return res; }