Fixed some labels font display problem

Improved Display Messages Labels: From,Date,Subject,To, redesign the To Label to display it more user friendly

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2653 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-03-28 15:56:38 +00:00
parent 27c2382d8c
commit 8971102bde
2 changed files with 41 additions and 92 deletions

View File

@ -884,30 +884,21 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
QString msgTxt;
for(pit = msgInfo.msgto.begin(); pit != msgInfo.msgto.end(); pit++)
{
msgTxt += QString::fromStdString(*pit);
msgTxt += " <";
msgTxt += QString::fromStdString(rsPeers->getPeerName(*pit));
msgTxt += ">, ";
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " , ";
}
if (msgInfo.msgcc.size() > 0)
msgTxt += "\nCc: ";
for(pit = msgInfo.msgcc.begin(); pit != msgInfo.msgcc.end(); pit++)
{
msgTxt += QString::fromStdString(*pit);
msgTxt += " <";
msgTxt += QString::fromStdString(rsPeers->getPeerName(*pit));
msgTxt += ">, ";
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " , ";
}
if (msgInfo.msgbcc.size() > 0)
msgTxt += "\nBcc: ";
for(pit = msgInfo.msgbcc.begin(); pit != msgInfo.msgbcc.end(); pit++)
{
msgTxt += QString::fromStdString(*pit);
msgTxt += " <";
msgTxt += QString::fromStdString(rsPeers->getPeerName(*pit));
msgTxt += ">, ";
msgTxt += "<a style='color: black;'href='" + QString::fromStdString(rsPeers->getPeerName(*pit)) + "@" + QString::fromStdString(*pit) + "'> " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "</a>" + " , ";
}
{
@ -917,7 +908,8 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
ui.dateText-> setText(timestamp);
}
ui.toText->setText(msgTxt);
ui.fromText->setText("<a style='color: blue;' href='" + QString::fromStdString(rsPeers->getPeerName(msgInfo.srcId)) + "'> " + QString::fromStdString(rsPeers->getPeerName(msgInfo.srcId)) +"</a>");
ui.fromText->setText("<a style='color: blue;' href='" + QString::fromStdString(rsPeers->getPeerName(msgInfo.srcId)) + "@" + QString::fromStdString(msgInfo.srcId) + "'> " + QString::fromStdString(rsPeers->getPeerName(msgInfo.srcId)) +"</a>");
ui.fromText->setToolTip(QString::fromStdString(rsPeers->getPeerName(msgInfo.srcId)) + "@" + QString::fromStdString(msgInfo.srcId));
ui.subjectText->setText(QString::fromStdWString(msgInfo.title));
ui.msgText->setHtml(QString::fromStdWString(msgInfo.msg));

View File

@ -946,6 +946,12 @@ border-image: url(:/images/closepressed.png)
<enum>Qt::Horizontal</enum>
</property>
<widget class="QListWidget" name="listWidget">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
@ -1183,7 +1189,7 @@ p, li { white-space: pre-wrap; }
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<width>2</width>
<height>40</height>
</size>
</property>
@ -1234,21 +1240,21 @@ p, li { white-space: pre-wrap; }
<item row="0" column="2">
<widget class="QLabel" name="subjectText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>12</height>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>12</height>
<height>16777215</height>
</size>
</property>
<property name="font">
@ -1259,6 +1265,9 @@ p, li { white-space: pre-wrap; }
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="1" column="0">
@ -1293,10 +1302,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="2">
<item row="1" column="2" colspan="2">
<widget class="QLabel" name="fromText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -1304,13 +1313,13 @@ p, li { white-space: pre-wrap; }
<property name="minimumSize">
<size>
<width>0</width>
<height>12</height>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>12</height>
<height>16777215</height>
</size>
</property>
<property name="font">
@ -1327,68 +1336,6 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="datelabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>12</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>10</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Date:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="dateText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>12</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>12</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="tolabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -1420,19 +1367,29 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QTextBrowser" name="toText">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>22</height>
</size>
</property>
<item row="0" column="3">
<widget class="QLabel" name="dateText">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<widget class="QLabel" name="toText">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>