mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed ForumsMsgItem to not stretch the widget, when forum subject is too long, and optimized little bit.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4191 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
70c3c9678d
commit
6f7dadfdc5
@ -58,8 +58,10 @@ ForumMsgItem::ForumMsgItem(FeedHolder *parent, uint32_t feedId, const std::strin
|
||||
connect( unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeForum ( void ) ) );
|
||||
connect( replyButton, SIGNAL( clicked( void ) ), this, SLOT( replyToPost ( void ) ) );
|
||||
connect( sendButton, SIGNAL( clicked( ) ), this, SLOT( sendMsg() ) );
|
||||
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
||||
subjectLabel->setMinimumWidth(20);
|
||||
|
||||
small();
|
||||
updateItemStatic();
|
||||
@ -144,9 +146,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
|
||||
if (rsPeers->getPeerName(msg.srcId) !="")
|
||||
{
|
||||
RetroShareLink linkMessage;
|
||||
linkMessage.createMessage(msg.srcId, "");
|
||||
namelabel->setText(linkMessage.toHtml());
|
||||
namelabel->setText(QString::fromStdString(rsPeers->getPeerName(msg.srcId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -158,8 +158,8 @@ void ForumMsgItem::updateItemStatic()
|
||||
|
||||
QDateTime qtime;
|
||||
qtime.setTime_t(msg.ts);
|
||||
QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss");
|
||||
timestamplabel->setText(timestamp);
|
||||
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm");
|
||||
timestamplabel->setText(timestamp);
|
||||
|
||||
nextFrame->hide();
|
||||
}
|
||||
@ -169,9 +169,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
|
||||
if (rsPeers->getPeerName(msg.srcId) !="")
|
||||
{
|
||||
RetroShareLink linkMessage;
|
||||
linkMessage.createMessage(msg.srcId, "");
|
||||
nextnamelabel->setText(linkMessage.toHtml());
|
||||
nextnamelabel->setText(QString::fromStdString(rsPeers->getPeerName(msg.srcId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -183,7 +181,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
|
||||
QDateTime qtime;
|
||||
qtime.setTime_t(msg.ts);
|
||||
QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss");
|
||||
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm");
|
||||
timestamplabel->setText(timestamp);
|
||||
|
||||
prevSHLabel->setText(tr("In Reply to") + ": ");
|
||||
@ -200,9 +198,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
|
||||
if (rsPeers->getPeerName(msgParent.srcId) !="")
|
||||
{
|
||||
RetroShareLink linkMessage;
|
||||
linkMessage.createMessage(msgParent.srcId, "");
|
||||
namelabel->setText(linkMessage.toHtml());
|
||||
namelabel->setText(QString::fromStdString(rsPeers->getPeerName(msgParent.srcId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -218,7 +214,7 @@ void ForumMsgItem::updateItemStatic()
|
||||
|
||||
/* header stuff */
|
||||
subjectLabel->setText(QString::fromStdWString(msg.title));
|
||||
srcLabel->setText(QString::fromStdString(msg.srcId));
|
||||
//srcLabel->setText(QString::fromStdString(msg.srcId));
|
||||
}
|
||||
|
||||
if (mIsHome)
|
||||
|
@ -115,7 +115,7 @@ border-radius: 10px}</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLabel" name="timestamplabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -128,47 +128,7 @@ border-radius: 10px}</string>
|
||||
<string notr="true">Timestamp</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="expandButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Expand</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Remove Item</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -207,6 +167,9 @@ border-radius: 10px}</string>
|
||||
<property name="text">
|
||||
<string notr="true">Subject...</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -228,29 +191,6 @@ border-radius: 10px}</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="srcLabel">
|
||||
<property name="text">
|
||||
<string notr="true">Persons Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="unsubscribeButton">
|
||||
<property name="sizePolicy">
|
||||
@ -307,6 +247,46 @@ border-radius: 10px}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="expandButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Expand</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clearButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Remove Item</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
|
Loading…
Reference in New Issue
Block a user