diff --git a/retroshare-gui/src/gui/ChatDialog.cpp b/retroshare-gui/src/gui/ChatDialog.cpp index 694d1ae2f..9d8809e1f 100644 --- a/retroshare-gui/src/gui/ChatDialog.cpp +++ b/retroshare-gui/src/gui/ChatDialog.cpp @@ -72,7 +72,10 @@ ChatDialog::ChatDialog(QWidget *parent) /* to hide the header */ ui.msgSendList->header()->hide(); - textColor = Qt::black; + textColor = Qt::black; + QPixmap pxm(24,24); + pxm.fill(textColor); + ui.colorChatButton->setIcon(pxm); /* Hide platform specific features */ @@ -277,7 +280,10 @@ void ChatDialog::setColor() { textColor = QColorDialog::getColor(Qt::black, this); QPixmap pxm(24,24); - pxm.fill(textColor); + pxm.fill(textColor); + ui.lineEdit->setText(QString(tr("insertAutour(tr("\">"), tr("")); + this->ui.lineEdit->setFocus(); ui.colorChatButton->setIcon(pxm); } diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index 8fb678a5e..4617c669a 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -97,7 +97,8 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name, fontmenu->addAction(ui.actionUnderline); fontmenu->addAction(ui.actionItalic); fontmenu->addAction(ui.actionStrike); - ui.fontButton->setMenu(fontmenu); + ui.fontButton->setMenu(fontmenu); + } @@ -117,7 +118,7 @@ void PopupChatDialog::show() if(!this->isVisible()) { QMainWindow::show(); } else { - //QMainWindow::activateWindow(); + QMainWindow::activateWindow(); setWindowState(windowState() & ~Qt::WindowMinimized | Qt::WindowActive); QMainWindow::raise(); } @@ -136,6 +137,9 @@ void PopupChatDialog::setColor() if (col.isValid()) { ui.colorButton->setPalette(QPalette(col)); + ui.lineEdit->setText(QString(tr("insertAutour(tr("\">"), tr("")); + this->ui.lineEdit->setFocus(); QTextCharFormat fmt; fmt.setForeground(col); colorChanged(col); @@ -316,3 +320,5 @@ void PopupChatDialog::insertAutour(QString leftTruc,QString rightTruc) } + + diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.h b/retroshare-gui/src/gui/chat/PopupChatDialog.h index 1a8abbfe9..24d62215a 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.h +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.h @@ -61,6 +61,7 @@ public slots: void insertStrike(); void insertAutour(QString leftTruc,QString rightTruc); + protected: void closeEvent (QCloseEvent * event);