Some Layout changes for MsgItem

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5074 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2012-04-02 15:57:44 +00:00
parent 61f5ff5180
commit fb47f06d24
2 changed files with 219 additions and 196 deletions

View File

@ -84,13 +84,12 @@ void MsgItem::updateItemStatic()
avatar->setId(mPeerId, false); avatar->setId(mPeerId, false);
QString title; QString title;
QString timestamp;
QString srcName = QString::fromUtf8(rsPeers->getPeerName(mi.srcId).c_str()); QString srcName = QString::fromUtf8(rsPeers->getPeerName(mi.srcId).c_str());
{ {
QDateTime qtime; QDateTime qtime;
qtime.setTime_t(mi.ts); qtime.setTime_t(mi.ts);
timestamp = qtime.toString("yyyy-MM-dd hh:mm:ss"); timestampLabel->setText(qtime.toString("dd.MMMM yyyy hh:mm:ss"));
} }
if (!mIsHome) if (!mIsHome)
@ -122,7 +121,7 @@ void MsgItem::updateItemStatic()
break; break;
} }
} }
title += srcName + " @ " + timestamp; title += srcName;
titleLabel->setText(title); titleLabel->setText(title);
subjectLabel->setText(QString::fromStdWString(mi.title)); subjectLabel->setText(QString::fromStdWString(mi.title));

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>710</width> <width>438</width>
<height>174</height> <height>146</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -37,11 +37,23 @@ border-radius: 10px}</string>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <property name="margin">
<number>0</number>
</property>
<item row="0" column="0" rowspan="3">
<widget class="AvatarWidget" name="avatar" native="true"> <widget class="AvatarWidget" name="avatar" native="true">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -62,9 +74,7 @@ background-color: #2291E0;
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="4"> <item row="0" column="1">
<layout class="QGridLayout">
<item row="0" column="0">
<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">
@ -87,7 +97,7 @@ background-color: #2291E0;
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="2" colspan="3">
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -103,47 +113,20 @@ background-color: #2291E0;
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="2"> <item row="0" column="5" colspan="3">
<widget class="QPushButton" name="expandButton"> <widget class="QLabel" name="timestampLabel">
<property name="sizePolicy"> <property name="font">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <font>
<horstretch>0</horstretch> <weight>75</weight>
<verstretch>0</verstretch> <bold>true</bold>
</sizepolicy> </font>
</property>
<property name="toolTip">
<string>Expand</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string>TextLabel</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="3"> <item row="1" column="1" colspan="7">
<widget class="QPushButton" name="clearButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" 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 resource="../images.qrc">
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0" colspan="4">
<widget class="QLabel" name="subjectLabel"> <widget class="QLabel" name="subjectLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@ -159,9 +142,7 @@ background-color: #2291E0;
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="2" column="1" colspan="2">
</item>
<item row="1" column="1">
<widget class="QToolButton" name="replyButton"> <widget class="QToolButton" name="replyButton">
<property name="toolTip"> <property name="toolTip">
<string>Reply to Message</string> <string>Reply to Message</string>
@ -181,7 +162,7 @@ background-color: #2291E0;
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="2" column="3">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -194,7 +175,7 @@ background-color: #2291E0;
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="3"> <item row="2" column="4">
<widget class="QPushButton" name="deleteButton"> <widget class="QPushButton" name="deleteButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -214,7 +195,7 @@ background-color: #2291E0;
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="4"> <item row="2" column="5">
<widget class="QPushButton" name="playButton"> <widget class="QPushButton" name="playButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -234,7 +215,50 @@ background-color: #2291E0;
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="5"> <item row="2" column="6">
<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 resource="../images.qrc">
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
</property>
</widget>
</item>
<item row="2" column="7">
<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 resource="../images.qrc">
<normaloff>:/images/close_normal.png</normaloff>:/images/close_normal.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="expandFrame"> <widget class="QFrame" name="expandFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>