mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 14:10:54 -04:00
fixing margins & hide notes field when its empty
This commit is contained in:
parent
b96fecfcbb
commit
f482e681e3
2 changed files with 14 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <QDateTime>
|
||||
#include <QMenu>
|
||||
#include <QStyle>
|
||||
#include <QTextDocument>
|
||||
|
||||
#include "rshare.h"
|
||||
#include "PostedCardView.h"
|
||||
|
@ -332,7 +333,10 @@ void PostedCardView::fill()
|
|||
// FIX THIS UP LATER.
|
||||
ui->notes->setText(RsHtml().formatText(NULL, QString::fromUtf8(mPost.mNotes.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||
|
||||
if(ui->notes->text().isEmpty())
|
||||
QTextDocument doc;
|
||||
doc.setHtml(ui->notes->text());
|
||||
|
||||
if(doc.toPlainText().trimmed().isEmpty())
|
||||
ui->notes->hide();
|
||||
// differences between Feed or Top of Comment.
|
||||
if (mFeedHolder)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue