fixed scaling of items.

This commit is contained in:
csoler 2020-07-04 22:51:10 +02:00
parent b453f80cbd
commit 75cf9d6c86
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 98 additions and 69 deletions

View File

@ -260,8 +260,10 @@ void BoardPostDisplayWidget::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));
QTextDocument doc;
doc.setHtml(ui->notes->text());
if( ui->notes->document()==nullptr || ui->notes->document()->toPlainText().trimmed().isEmpty())
if(doc.toPlainText().trimmed().isEmpty())
ui->notes->hide();
#ifdef TO_REMOVE

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>747</width>
<height>366</height>
<height>199</height>
</rect>
</property>
<property name="sizePolicy">
@ -23,6 +23,8 @@
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@ -97,6 +99,21 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
@ -248,6 +265,19 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="notes">
<property name="text">
<string>TextLabel</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="siteLabel">
<property name="sizePolicy">
@ -291,9 +321,6 @@
</item>
</layout>
</item>
<item>
<widget class="QTextEdit" name="notes"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>