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. // FIX THIS UP LATER.
ui->notes->setText(RsHtml().formatText(NULL, QString::fromUtf8(mPost.mNotes.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS)); ui->notes->setText(RsHtml().formatText(NULL, QString::fromUtf8(mPost.mNotes.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
QTextDocument doc;
if( ui->notes->document()==nullptr || ui->notes->document()->toPlainText().trimmed().isEmpty()) doc.setHtml(ui->notes->text());
if(doc.toPlainText().trimmed().isEmpty())
ui->notes->hide(); ui->notes->hide();
#ifdef TO_REMOVE #ifdef TO_REMOVE

View file

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>747</width> <width>747</width>
<height>366</height> <height>199</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -24,76 +24,93 @@
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<widget class="QToolButton" name="voteUpButton"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="sizePolicy"> <item>
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <widget class="QToolButton" name="voteUpButton">
<horstretch>0</horstretch> <property name="sizePolicy">
<verstretch>0</verstretch> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
</sizepolicy> <horstretch>0</horstretch>
</property> <verstretch>0</verstretch>
<property name="toolTip"> </sizepolicy>
<string>Vote up</string> </property>
</property> <property name="toolTip">
<property name="text"> <string>Vote up</string>
<string/> </property>
</property> <property name="text">
<property name="icon"> <string/>
<iconset resource="Posted_images.qrc"> </property>
<normaloff>:/images/up-arrow.png</normaloff>:/images/up-arrow.png</iconset> <property name="icon">
</property> <iconset resource="Posted_images.qrc">
<property name="autoRaise"> <normaloff>:/images/up-arrow.png</normaloff>:/images/up-arrow.png</iconset>
<bool>true</bool> </property>
</property> <property name="autoRaise">
</widget> <bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="StyledLabel" name="scoreLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="voteDownButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Vote down</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>\/</string>
</property>
<property name="icon">
<iconset resource="Posted_images.qrc">
<normaloff>:/images/down-arrow.png</normaloff>:/images/down-arrow.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="StyledLabel" name="scoreLabel"> <spacer name="verticalSpacer">
<property name="font"> <property name="orientation">
<font> <enum>Qt::Vertical</enum>
<pointsize>9</pointsize>
</font>
</property> </property>
<property name="text"> <property name="sizeHint" stdset="0">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="voteDownButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size> <size>
<width>0</width> <width>20</width>
<height>0</height> <height>40</height>
</size> </size>
</property> </property>
<property name="toolTip"> </spacer>
<string>Vote down</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>\/</string>
</property>
<property name="icon">
<iconset resource="Posted_images.qrc">
<normaloff>:/images/down-arrow.png</normaloff>:/images/down-arrow.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
@ -248,6 +265,19 @@
</property> </property>
</widget> </widget>
</item> </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> <item>
<widget class="QLabel" name="siteLabel"> <widget class="QLabel" name="siteLabel">
<property name="sizePolicy"> <property name="sizePolicy">
@ -291,9 +321,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QTextEdit" name="notes"/>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>