Fixes #248 user color not normalized

This commit is contained in:
fourtf 2018-01-22 14:35:51 +01:00
parent 3104aae80a
commit bd50b2ae79
2 changed files with 6 additions and 4 deletions

@ -1 +1 @@
Subproject commit 2fa3adf42da988dc2a34b9b625654aa08e906d4f
Subproject commit 89f767a5ed2ea5724a4bf5b6170365e5d069634a

View file

@ -123,9 +123,11 @@ void TextElement::addToContainer(MessageLayoutContainer &container, MessageEleme
for (Word &word : this->words) {
auto getTextLayoutElement = [&](QString text, int width, bool trailingSpace) {
auto e = (new TextLayoutElement(*this, text, QSize(width, metrics.height()),
this->color.getColor(themeManager), this->style,
container.scale))
QColor color = this->color.getColor(themeManager);
themeManager.normalizeColor(color);
auto e = (new TextLayoutElement(*this, text, QSize(width, metrics.height()), color,
this->style, container.scale))
->setLink(this->getLink());
e->setTrailingSpace(trailingSpace);
return e;