summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgen Servetnik <e.servetnik@samsung.com>2017-09-06 16:53:30 +0300
committerEvgen Servetnik <e.servetnik@samsung.com>2017-09-06 13:54:41 +0000
commitb7f1ccc59a33b53399c974d38268afd1fa070e35 (patch)
tree3daead04f7e34c5942fb64b76bf316d32c9051fb
parenta1d9660c8a45b4ae602b64252dafe4c706d05c23 (diff)
downloadmessage-b7f1ccc59a33b53399c974d38268afd1fa070e35.tar.gz
message-b7f1ccc59a33b53399c974d38268afd1fa070e35.tar.bz2
message-b7f1ccc59a33b53399c974d38268afd1fa070e35.zip
TizenRefApp-9247 Fix color of highlighted recipients.submit/tizen/20170906.154058
Change-Id: Iffde1ef8b08b16f292387351bc456ca558c86287 Signed-off-by: Evgen Servetnik <e.servetnik@samsung.com>
-rw-r--r--src/Common/Utils/inc/TextDecorator.h1
-rw-r--r--src/Common/Utils/src/TextDecorator.cpp7
2 files changed, 5 insertions, 3 deletions
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 += "<match>";
+ res += "<color=" + std::string(TextStyle::matchColor) + ">";
res += std::string(found, searchWord.length());
- res += "</match>";
+ res += "</color>";
res += lastPart;
-
return res;
}