fix descriptions display in Posted

This commit is contained in:
RetroPooh 2017-10-22 19:39:44 +03:00
parent b6f102cabb
commit 723016e930
2 changed files with 20 additions and 30 deletions

View File

@ -104,8 +104,6 @@ void PostedItem::setup()
ui->clearButton->hide(); ui->clearButton->hide();
ui->readAndClearButton->hide(); ui->readAndClearButton->hide();
ui->frame_notes->hide();
} }
bool PostedItem::setGroup(const RsPostedGroup &group, bool doFill) bool PostedItem::setGroup(const RsPostedGroup &group, bool doFill)
@ -278,11 +276,12 @@ void PostedItem::fill()
// FIX THIS UP LATER. // FIX THIS UP LATER.
ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str())); ui->notes->setText(QString::fromUtf8(mPost.mNotes.c_str()));
if(ui->notes->text().isEmpty())
ui->frame_notes->hide();
// differences between Feed or Top of Comment. // differences between Feed or Top of Comment.
if (mFeedHolder) if (mFeedHolder)
{ {
// feed. // feed.
ui->frame_notes->hide();
//frame_comment->show(); //frame_comment->show();
ui->commentButton->show(); ui->commentButton->show();
@ -303,14 +302,6 @@ void PostedItem::fill()
else else
{ {
// no feed. // no feed.
if(ui->notes->text().isEmpty())
{
ui->frame_notes->hide();
}
else
{
ui->frame_notes->show();
}
//frame_comment->hide(); //frame_comment->hide();
ui->commentButton->hide(); ui->commentButton->hide();

View File

@ -327,23 +327,20 @@
<item> <item>
<widget class="QFrame" name="frame_notes"> <widget class="QFrame" name="frame_notes">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>1</number>
</property>
<property name="spacing">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="notes"> <widget class="QLabel" name="notes">
<property name="geometry">
<rect>
<x>2</x>
<y>2</y>
<width>16</width>
<height>17</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -351,6 +348,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>