From f064325592aa6a6868f2de7316865ed94e57dd7e Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 3 Oct 2020 18:59:44 +0200 Subject: [PATCH] fixed default size of default icon in boards --- retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp index 61cdaea2d..f565f7439 100644 --- a/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp +++ b/retroshare-gui/src/gui/Posted/BoardPostDisplayWidget.cpp @@ -353,6 +353,9 @@ void BoardPostDisplayWidget_compact::setup() } else { + int desired_height = QFontMetricsF(font()).height() * 5; + ui->pictureLabel->setFixedSize(16/9.0*desired_height,desired_height); + if(mPost.mImage.mData != NULL) { QPixmap pixmap; @@ -365,13 +368,10 @@ void BoardPostDisplayWidget_compact::setup() pixmap.save("pix.png","PNG"); #endif - int desired_height = QFontMetricsF(font()).height() * 5; - ui->pictureLabel->setFixedSize(16/9.0*desired_height,desired_height); ui->pictureLabel->setPicture(pixmap); } else ui->pictureLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png") ); - } ui->notes->setText(RsHtml().formatText(NULL, QString::fromUtf8(mPost.mNotes.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));