mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
enabled to display the Avatar Frame by default, and optimized the labels
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3436 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f1ae5766dd
commit
1bcaeebdaa
@ -106,8 +106,8 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
||||
last_status_send_time = 0 ;
|
||||
styleHtm = ":/qss/chat/default.htm";
|
||||
|
||||
/* Hide Avatar and Info frame */
|
||||
showAvatarFrame(false);
|
||||
/* Hide or show the frames */
|
||||
showAvatarFrame(true);
|
||||
ui.infoframe->setVisible(false);
|
||||
ui.statusmessagelabel->hide();
|
||||
|
||||
@ -1260,6 +1260,9 @@ void PopupChatDialog::setCurrentFileName(const QString &fileName)
|
||||
void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
{
|
||||
std::string stdPeerId = peer_id.toStdString();
|
||||
|
||||
/* set font size for status */
|
||||
QString statusString("<span style=\"font-size:11pt; font-weight:500;""\">%1</span>");
|
||||
|
||||
if (stdPeerId == dialogId) {
|
||||
// the peers status has changed
|
||||
@ -1269,8 +1272,7 @@ void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
ui.avatarlabel->setEnabled(false);
|
||||
ui.infoframe->setVisible(true);
|
||||
ui.infolabel->setText( QString::fromStdString(dialogName) + " " + tr("apears to be Offline.") +"\n" + tr("Messages you send will be lost and not delivered, rs-Mail this contact instead."));
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName)) ;
|
||||
ui.statuslabel->setText( tr("(Offline)")) ;
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName) + " " + statusString.arg("(Offline)")) ;
|
||||
break;
|
||||
|
||||
case RS_STATUS_INACTIVE:
|
||||
@ -1278,16 +1280,14 @@ void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infoframe->setVisible(true);
|
||||
ui.infolabel->setText( QString::fromStdString(dialogName) + " " + tr("is Idle and may not reply"));
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName)) ;
|
||||
ui.statuslabel->setText( tr("(Idle)")) ;
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName) + " " + statusString.arg("(Idle)")) ;
|
||||
break;
|
||||
|
||||
case RS_STATUS_ONLINE:
|
||||
ui.avatarlabel->setStyleSheet("QLabel#avatarlabel{ border-image:url(:/images/avatarstatus_bg_online.png); }");
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infoframe->setVisible(false);
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName)) ;
|
||||
ui.statuslabel->setText( tr("(Online)")) ;
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName) + " " + statusString.arg("(Online)")) ;
|
||||
break;
|
||||
|
||||
case RS_STATUS_AWAY:
|
||||
@ -1295,8 +1295,7 @@ void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infolabel->setText( QString::fromStdString(dialogName) + " " + tr("is Away and may not reply"));
|
||||
ui.infoframe->setVisible(true);
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName)) ;
|
||||
ui.statuslabel->setText( tr("(Away)")) ;
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName) + " " + statusString.arg("(Away)")) ;
|
||||
break;
|
||||
|
||||
case RS_STATUS_BUSY:
|
||||
@ -1304,8 +1303,7 @@ void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
ui.avatarlabel->setEnabled(true);
|
||||
ui.infolabel->setText( QString::fromStdString(dialogName) + " " + tr("is Busy and may not reply"));
|
||||
ui.infoframe->setVisible(true);
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName));
|
||||
ui.statuslabel->setText( tr("(Busy)")) ;
|
||||
ui.friendnamelabel->setText( QString::fromStdString(dialogName) + " " + statusString.arg("(Busy)")) ;
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
@ -9,7 +9,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>528</width>
|
||||
<width>531</width>
|
||||
<height>451</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -235,7 +235,7 @@ border-image: url(:/images/avatarstatus_bg.png);
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="friendnamelabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
@ -257,20 +257,7 @@ border-image: url(:/images/avatarstatus_bg.png);
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="statuslabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="statusmessagelabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -283,19 +270,6 @@ border-image: url(:/images/avatarstatus_bg.png);
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -975,6 +949,12 @@ p, li { white-space: pre-wrap; }
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
Reference in New Issue
Block a user