From a57ebbe623d48a89642c8f9ed9451a2c71029691 Mon Sep 17 00:00:00 2001 From: defnax Date: Mon, 13 Sep 2010 14:24:26 +0000 Subject: [PATCH] Added border style sheet for the Channel Thumbnail Label. Fixed to not allow to stretch the Description Label, when text is too big, then view the full text when frame is shown. Removed one Button on PeerItem and use now a menu when want use the Advanced Messaging git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3478 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/feeds/ChanMsgItem.cpp | 1 + retroshare-gui/src/gui/feeds/ChanMsgItem.ui | 7 ++++ retroshare-gui/src/gui/feeds/PeerItem.cpp | 15 ++++---- retroshare-gui/src/gui/feeds/PeerItem.ui | 36 ++++++-------------- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp b/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp index dbc5aa35f..f727076d2 100644 --- a/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp @@ -128,6 +128,7 @@ void ChanMsgItem::updateItemStatic() "PNG"); label->setPixmap(thumbnail); + label->setStyleSheet("QLabel#label{border: 2px solid #D3D3D3;border-radius: 2px;}"); } if (mIsHome) diff --git a/retroshare-gui/src/gui/feeds/ChanMsgItem.ui b/retroshare-gui/src/gui/feeds/ChanMsgItem.ui index 0d6849321..c5ecb6652 100644 --- a/retroshare-gui/src/gui/feeds/ChanMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/ChanMsgItem.ui @@ -155,6 +155,12 @@ p, li { white-space: pre-wrap; } 0 + + + 16777215 + 60 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -307,6 +313,7 @@ border-radius: 10px;} + diff --git a/retroshare-gui/src/gui/feeds/PeerItem.cpp b/retroshare-gui/src/gui/feeds/PeerItem.cpp index 69adfce7b..ebb82868e 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.cpp +++ b/retroshare-gui/src/gui/feeds/PeerItem.cpp @@ -55,7 +55,7 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint /* specific ones */ connect( chatButton, SIGNAL( clicked( void ) ), this, SLOT( openChat ( void ) ) ); - connect( msgButton, SIGNAL( clicked( void ) ), this, SLOT( sendMsg ( void ) ) ); + connect( actionNew_Message, SIGNAL( triggered( ) ), this, SLOT( sendMsg ( void ) ) ); connect( quickmsgButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) ); connect( cancelButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) ); @@ -63,6 +63,11 @@ PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint connect( sendmsgButton, SIGNAL( clicked( ) ), this, SLOT( sendMessage() ) ); connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&))); + + QMenu *msgmenu = new QMenu(); + msgmenu->addAction(actionNew_Message); + + quickmsgButton->setMenu(msgmenu); small(); updateItemStatic(); @@ -135,9 +140,7 @@ void PeerItem::updateItemStatic() lastLabel->setText(tr("Unknown Peer")); chatButton->setEnabled(false); - //addButton->setEnabled(false); - //removeButton->setEnabled(false); - msgButton->setEnabled(false); + } if (mIsHome) @@ -205,13 +208,13 @@ void PeerItem::updateItem() { //addButton->setEnabled(false); //removeButton->setEnabled(true); - msgButton->setEnabled(true); + quickmsgButton->setEnabled(true); } else { //addButton->setEnabled(true); //removeButton->setEnabled(false); - msgButton->setEnabled(false); + quickmsgButton->setEnabled(false); } } diff --git a/retroshare-gui/src/gui/feeds/PeerItem.ui b/retroshare-gui/src/gui/feeds/PeerItem.ui index 476e8edf5..a30e11143 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.ui +++ b/retroshare-gui/src/gui/feeds/PeerItem.ui @@ -227,31 +227,8 @@ border-radius: 10px} :/images/message-mail.png:/images/message-mail.png - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Send Mail - - - Write Message - - - - :/images/mail_send.png:/images/mail_send.png + + QToolButton::MenuButtonPopup Qt::ToolButtonTextBesideIcon @@ -576,6 +553,15 @@ border-radius: 10px} + + + + :/images/mail_send.png:/images/mail_send.png + + + Write Message + +