fixed to enable wordwrap for Forum Message Item, to not display long message in one line.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3398 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-08-27 13:52:17 +00:00
parent af81ffcf43
commit d5090ea33c
2 changed files with 74 additions and 27 deletions

View File

@ -117,10 +117,10 @@ void ForumMsgItem::updateItemStatic()
prevSubLabel->setText(QString::fromStdWString(msg.title)); prevSubLabel->setText(QString::fromStdWString(msg.title));
prevMsgLabel->setText(QString::fromStdWString(msg.msg)); prevMsgLabel->setText(QString::fromStdWString(msg.msg));
QDateTime qtime; QDateTime qtime;
qtime.setTime_t(msg.ts); qtime.setTime_t(msg.ts);
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss"); QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss");
timestamplabel->setText(timestamp); timestamplabel->setText(timestamp);
nextFrame->hide(); nextFrame->hide();
} }
@ -130,9 +130,9 @@ void ForumMsgItem::updateItemStatic()
nextMsgLabel->setText(QString::fromStdWString(msg.msg)); nextMsgLabel->setText(QString::fromStdWString(msg.msg));
QDateTime qtime; QDateTime qtime;
qtime.setTime_t(msg.ts); qtime.setTime_t(msg.ts);
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss"); QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss");
timestamplabel->setText(timestamp); timestamplabel->setText(timestamp);
prevSHLabel->setText("In Reply To: "); prevSHLabel->setText("In Reply To: ");

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>716</width> <width>716</width>
<height>340</height> <height>270</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -37,26 +37,41 @@ border-radius: 10px}</string>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout"> <layout class="QGridLayout" name="gridLayout_3">
<property name="topMargin"> <item row="0" column="0">
<number>6</number> <layout class="QGridLayout" name="gridLayout">
</property> <item row="0" column="0">
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QLabel#label{border: 2px solid black;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #F7B552, stop: 1 #FB8428);
border-radius: 10px}</string>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="../images.qrc">:/images/konversation.png</pixmap> <pixmap resource="../images.qrc">:/images/konversation.png</pixmap>
</property> </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QLabel" name="titleLabel"> <widget class="QLabel" name="titleLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@ -75,22 +90,29 @@ border-radius: 10px}</string>
<property name="text"> <property name="text">
<string>Forum Name</string> <string>Forum Name</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget> </widget>
</item> </item>
<item> </layout>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>358</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item row="0" column="1">
<widget class="QLabel" name="timestamplabel"> <widget class="QLabel" name="timestamplabel">
<property name="font"> <property name="font">
<font> <font>
@ -102,9 +124,12 @@ border-radius: 10px}</string>
<property name="text"> <property name="text">
<string>Timestamp</string> <string>Timestamp</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="2">
<widget class="QPushButton" name="expandButton"> <widget class="QPushButton" name="expandButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -124,7 +149,7 @@ border-radius: 10px}</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="3">
<widget class="QPushButton" name="clearButton"> <widget class="QPushButton" name="clearButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -144,9 +169,22 @@ border-radius: 10px}</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="4">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>518</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item> <item row="1" column="0" colspan="2">
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
@ -265,7 +303,7 @@ border-radius: 10px}</string>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="2" column="0" colspan="2">
<widget class="QFrame" name="prevFrame"> <widget class="QFrame" name="prevFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
@ -339,6 +377,9 @@ border-radius: 10px}</string>
<property name="text"> <property name="text">
<string>Previous Message...</string> <string>Previous Message...</string>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -362,7 +403,7 @@ border-radius: 10px}</string>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item row="3" column="0" colspan="2">
<widget class="QFrame" name="nextFrame"> <widget class="QFrame" name="nextFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
@ -452,6 +493,9 @@ border-radius: 10px}</string>
<property name="text"> <property name="text">
<string>Currnent Message..</string> <string>Currnent Message..</string>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -466,6 +510,9 @@ border-radius: 10px}</string>
</widget> </widget>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>