From c4a3792500ceb635ee63e52f7942da58bd1550a7 Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 17 Aug 2008 14:13:09 +0000 Subject: [PATCH] * added for expandButtons correct hide/show icons + ToolTips * added some Vertikal Spacer to put each new Widget on Top for News Feed * added icons for typeComboBox git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@697 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/GeneralMsgDialog.cpp | 8 ++-- retroshare-gui/src/gui/feeds/ChanNewItem.cpp | 4 ++ retroshare-gui/src/gui/feeds/ChanNewItem.ui | 45 +++++++++++-------- retroshare-gui/src/gui/feeds/ForumMsgItem.cpp | 4 ++ retroshare-gui/src/gui/feeds/ForumMsgItem.ui | 32 +++++++------ retroshare-gui/src/gui/feeds/ForumNewItem.cpp | 4 ++ retroshare-gui/src/gui/feeds/ForumNewItem.ui | 45 +++++++++++-------- retroshare-gui/src/gui/feeds/PeerItem.cpp | 4 ++ 8 files changed, 90 insertions(+), 56 deletions(-) diff --git a/retroshare-gui/src/gui/GeneralMsgDialog.cpp b/retroshare-gui/src/gui/GeneralMsgDialog.cpp index 4d34fb7ad..f1be76291 100644 --- a/retroshare-gui/src/gui/GeneralMsgDialog.cpp +++ b/retroshare-gui/src/gui/GeneralMsgDialog.cpp @@ -55,10 +55,10 @@ GeneralMsgDialog::GeneralMsgDialog(QWidget *parent, uint32_t type) * */ typeComboBox->clear(); - typeComboBox->addItem("Message"); - typeComboBox->addItem("Forum"); - typeComboBox->addItem("Channel"); - typeComboBox->addItem("Blog"); + typeComboBox->addItem(QIcon(QString(":/images/evolution.png")),tr("Message")); + typeComboBox->addItem(QIcon(QString(":/images/konversation16.png")),tr("Forum")); + typeComboBox->addItem(QIcon(QString(":/images/channels16.png")),tr("Channel")); + typeComboBox->addItem(QIcon(QString(":/images/kblogger.png")),tr("Blog")); typeComboBox->setCurrentIndex(type); diff --git a/retroshare-gui/src/gui/feeds/ChanNewItem.cpp b/retroshare-gui/src/gui/feeds/ChanNewItem.cpp index c95efd594..b1fd3a4e7 100644 --- a/retroshare-gui/src/gui/feeds/ChanNewItem.cpp +++ b/retroshare-gui/src/gui/feeds/ChanNewItem.cpp @@ -132,10 +132,14 @@ void ChanNewItem::toggle() if (expandFrame->isHidden()) { expandFrame->show(); + expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + expandButton->setToolTip("Hide"); } else { expandFrame->hide(); + expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + expandButton->setToolTip("Expand"); } } diff --git a/retroshare-gui/src/gui/feeds/ChanNewItem.ui b/retroshare-gui/src/gui/feeds/ChanNewItem.ui index 3bb4578a2..00ecf94e7 100644 --- a/retroshare-gui/src/gui/feeds/ChanNewItem.ui +++ b/retroshare-gui/src/gui/feeds/ChanNewItem.ui @@ -57,7 +57,8 @@ - :/images/close_normal.png + + :/images/close_normal.png:/images/close_normal.png @@ -69,7 +70,7 @@ QSizePolicy::Preferred - + 16 26 @@ -105,7 +106,7 @@ QSizePolicy::Fixed - + 20 20 @@ -128,7 +129,7 @@ QSizePolicy::Expanding - + 500 20 @@ -151,7 +152,8 @@ - :/images/directoryadd_24x24_shadow.png + + :/images/directoryadd_24x24_shadow.png:/images/directoryadd_24x24_shadow.png @@ -163,7 +165,7 @@ QSizePolicy::Fixed - + 20 20 @@ -186,7 +188,8 @@ - :/images/add_24x24.png + + :/images/edit_add24.png:/images/edit_add24.png @@ -204,16 +207,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -224,7 +218,7 @@ - :/images/contacts24.png + :/images/contacts24.png @@ -247,13 +241,26 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + - + diff --git a/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp b/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp index 44c2f11aa..8f3e38535 100644 --- a/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp @@ -177,6 +177,8 @@ void ForumMsgItem::toggle() if (prevFrame->isHidden()) { prevFrame->show(); + expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + expandButton->setToolTip("Hide"); if (!mIsTop) { nextFrame->show(); @@ -186,6 +188,8 @@ void ForumMsgItem::toggle() { prevFrame->hide(); nextFrame->hide(); + expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + expandButton->setToolTip("Expand"); } } diff --git a/retroshare-gui/src/gui/feeds/ForumMsgItem.ui b/retroshare-gui/src/gui/feeds/ForumMsgItem.ui index 0f6929375..fdde07a0f 100644 --- a/retroshare-gui/src/gui/feeds/ForumMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/ForumMsgItem.ui @@ -57,7 +57,8 @@ - :/images/close_normal.png + + :/images/close_normal.png:/images/close_normal.png @@ -69,7 +70,7 @@ QSizePolicy::Preferred - + 16 26 @@ -105,7 +106,7 @@ QSizePolicy::Preferred - + 500 20 @@ -128,7 +129,8 @@ - :/images/add_24x24.png + + :/images/edit_add24.png:/images/edit_add24.png @@ -164,7 +166,7 @@ QSizePolicy::Expanding - + 200 20 @@ -187,7 +189,7 @@ QSizePolicy::Preferred - + 200 20 @@ -210,7 +212,8 @@ - :/images/mail_delete.png + + :/images/mail_delete.png:/images/mail_delete.png @@ -222,7 +225,7 @@ QSizePolicy::Fixed - + 20 20 @@ -245,7 +248,8 @@ - :/images/replymail24.png + + :/images/replymail24.png:/images/replymail24.png @@ -302,7 +306,7 @@ QSizePolicy::Preferred - + 40 20 @@ -335,7 +339,7 @@ QSizePolicy::Preferred - + 40 20 @@ -367,7 +371,7 @@ QSizePolicy::Preferred - + 40 20 @@ -419,7 +423,7 @@ QSizePolicy::Preferred - + 40 20 @@ -451,7 +455,7 @@ - + diff --git a/retroshare-gui/src/gui/feeds/ForumNewItem.cpp b/retroshare-gui/src/gui/feeds/ForumNewItem.cpp index 704c34611..9b31601ca 100644 --- a/retroshare-gui/src/gui/feeds/ForumNewItem.cpp +++ b/retroshare-gui/src/gui/feeds/ForumNewItem.cpp @@ -134,10 +134,14 @@ void ForumNewItem::toggle() if (expandFrame->isHidden()) { expandFrame->show(); + expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + expandButton->setToolTip("Hide"); } else { expandFrame->hide(); + expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + expandButton->setToolTip("Expand"); } } diff --git a/retroshare-gui/src/gui/feeds/ForumNewItem.ui b/retroshare-gui/src/gui/feeds/ForumNewItem.ui index 8f3ee6b6a..a21fe66d0 100644 --- a/retroshare-gui/src/gui/feeds/ForumNewItem.ui +++ b/retroshare-gui/src/gui/feeds/ForumNewItem.ui @@ -57,7 +57,8 @@ - :/images/close_normal.png + + :/images/close_normal.png:/images/close_normal.png @@ -69,7 +70,7 @@ QSizePolicy::Preferred - + 16 26 @@ -105,7 +106,7 @@ QSizePolicy::Fixed - + 20 20 @@ -128,7 +129,7 @@ QSizePolicy::Expanding - + 500 20 @@ -151,7 +152,8 @@ - :/images/directoryadd_24x24_shadow.png + + :/images/directoryadd_24x24_shadow.png:/images/directoryadd_24x24_shadow.png @@ -163,7 +165,7 @@ QSizePolicy::Fixed - + 20 20 @@ -186,7 +188,8 @@ - :/images/add_24x24.png + + :/images/edit_add24.png:/images/edit_add24.png @@ -204,16 +207,7 @@ 0 - - 0 - - - 0 - - - 0 - - + 0 @@ -224,7 +218,7 @@ - :/images/contacts24.png + :/images/contacts24.png @@ -244,6 +238,19 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -253,7 +260,7 @@ - + diff --git a/retroshare-gui/src/gui/feeds/PeerItem.cpp b/retroshare-gui/src/gui/feeds/PeerItem.cpp index 5c3a9e4ce..d45e2618f 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.cpp +++ b/retroshare-gui/src/gui/feeds/PeerItem.cpp @@ -213,10 +213,14 @@ void PeerItem::toggle() if (expandFrame->isHidden()) { expandFrame->show(); + expandButton->setIcon(QIcon(QString(":/images/edit_remove24.png"))); + expandButton->setToolTip("Hide"); } else { expandFrame->hide(); + expandButton->setIcon(QIcon(QString(":/images/edit_add24.png"))); + expandButton->setToolTip("Expand"); } }