diff --git a/retroshare-gui/src/gui/PeersDialog.ui b/retroshare-gui/src/gui/PeersDialog.ui index 134554020..3838f7f64 100644 --- a/retroshare-gui/src/gui/PeersDialog.ui +++ b/retroshare-gui/src/gui/PeersDialog.ui @@ -1181,6 +1181,21 @@ p, li { white-space: pre-wrap; } 24 + + QPushButton::menu-indicator { + subcontrol-origin: padding; + subcontrol-position: bottom right; + } + + QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open { + position: relative; + top: 1px; left: 1px; /* shift the arrow by 2 px */ + } + + QPushButton:hover { + border: 1px solid #CCCCCC; + } + diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index 30a08fffe..764ef0884 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -123,6 +123,11 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name, /*Disabled style Button when will switch chat style RetroShare will crash need to be fix */ //ui.styleButton->setEnabled(false); + + QMenu * toolmenu = new QMenu(); + toolmenu->addAction(ui.actionClear_Chat); + toolmenu->addAction(ui.action_Disable_Emoticons); + ui.pushtoolsButton->setMenu(toolmenu); mCurrentColor = Qt::black; @@ -267,6 +272,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci) std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() << std::endl; #endif + if(!ui.action_Disable_Emoticons->isChecked()) + { QHashIterator i(smileys); while(i.hasNext()) { @@ -274,6 +281,8 @@ std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() << foreach(QString code, i.key().split("|")) message.replace(code, ""); } + } + history /*<< nickColor << color << font << fontSize*/ << timestamp << name << message; QString formatMsg = loadEmptyStyle()/*.replace(nickColor) @@ -600,6 +609,11 @@ QString PopupChatDialog::loadEmptyStyle() } } +void PopupChatDialog::on_actionClear_Chat_triggered() +{ + ui.textBrowser->clear(); +} + void PopupChatDialog::changeStyle() { QString newStyle = QFileDialog::getOpenFileName(this, tr("Open Style"), diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.h b/retroshare-gui/src/gui/chat/PopupChatDialog.h index e50136b6e..4281c8bcd 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.h +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.h @@ -103,6 +103,8 @@ private slots: void sendChat(); void getAvatar(); + + void on_actionClear_Chat_triggered(); private: diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.ui b/retroshare-gui/src/gui/chat/PopupChatDialog.ui index a506f72ef..dd56a64fa 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.ui +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.ui @@ -13,6 +13,9 @@ MainWindow + + QToolBar#toolBar{background-image: url(:/images/connect/connectFriendBanner.png)} + @@ -214,6 +217,13 @@ border-image: url(:/images/mystatus_bg.png); 46 + + QFrame#Chatbuttonframe{ +background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, +stop:0 #FEFEFE, stop:1 #E8E8E8); + +border: 1px solid #CCCCCC;} + QFrame::StyledPanel @@ -443,6 +453,53 @@ p, li { white-space: pre-wrap; } + + + + + 28 + 28 + + + + + 28 + 28 + + + + QPushButton::menu-indicator { +subcontrol-origin: padding; +subcontrol-position: bottom right; +} + +QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open { +position: relative; +top: 1px; left: 1px; /* shift the arrow by 2 px */ +} + +QPushButton:hover { +border: 1px solid #CCCCCC; +} + + + + + + + :/images/configure.png:/images/configure.png + + + + 22 + 22 + + + + true + + + @@ -565,6 +622,23 @@ p, li { white-space: pre-wrap; } Set your Avatar Picture + + + + :/images/edit-clear-history.png:/images/edit-clear-history.png + + + Clear Chat + + + + + true + + + Disable Emoticons + +