diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 5209ca184..b37b15980 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -1695,22 +1695,31 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg) ui->by_text_label->show(); ui->by_label->show(); - if(redacted) - { + if(redacted) { QString extraTxt = tr( "

The author of this message (with ID %1) is banned.").arg(QString::fromStdString(msg.mMeta.mAuthorId.toStdString())) ; extraTxt += tr( "

") ; extraTxt += tr( "

You can force the visibility and forwarding of messages by setting a different opinion for that Id in People's tab.

") ; ui->postText->setHtml(extraTxt) ; - } - else - { - uint32_t flags = RSHTML_FORMATTEXT_EMBED_LINKS; - if(Settings->getForumLoadEmoticons()) - flags |= RSHTML_FORMATTEXT_EMBED_SMILEYS ; + } else { + uint32_t flags = RSHTML_FORMATTEXT_EMBED_LINKS; + if(Settings->getForumLoadEmoticons()) + flags |= RSHTML_FORMATTEXT_EMBED_SMILEYS ; + flags |= RSHTML_OPTIMIZEHTML_MASK; - QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()),flags); + QColor backgroundColor = ui->postText->palette().base().color(); + qreal desiredContrast = Settings->valueFromGroup("Chat", + "MinimumContrast", 4.5).toDouble(); + int desiredMinimumFontSize = Settings->valueFromGroup("Chat", + "MinimumFontSize", 10).toInt(); + + QString extraTxt = RsHtml().formatText(ui->postText->document(), + QString::fromUtf8(msg.mMsg.c_str()), flags + #ifndef DEBUG_FORUMS \ + , backgroundColor, desiredContrast, desiredMinimumFontSize + #endif + ); ui->postText->setHtml(extraTxt); } // ui->threadTitle->setText(QString::fromUtf8(msg.mMeta.mMsgName.c_str()));