mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
fixed setColor function
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@454 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a0247d39d1
commit
2cb92f2d5a
@ -284,18 +284,15 @@ void PopupChatDialog::showAvatarFrame(bool show)
|
||||
|
||||
void PopupChatDialog::setColor()
|
||||
{
|
||||
bool ok;
|
||||
QRgb color = QColorDialog::getRgba(ui.chattextEdit->textColor().rgba(), &ok, this);
|
||||
if (ok) {
|
||||
|
||||
QColor col = QColorDialog::getColor(Qt::black, this);
|
||||
if (col.isValid()) {
|
||||
|
||||
//ui.colorButton->setPalette(QPalette(col));
|
||||
//ui.chattextEdit->setTextCursor();
|
||||
ui.chattextEdit->setTextColor(QColor(col));
|
||||
//QTextCharFormat fmt;
|
||||
//fmt.setForeground(col);
|
||||
//mergeFormatOnWordOrSelection(fmt);
|
||||
colorChanged(col);
|
||||
currentColor = QColor(color);
|
||||
ui.chattextEdit->setTextColor(currentColor);
|
||||
colorChanged(currentColor);
|
||||
}
|
||||
ui.chattextEdit->setFocus();
|
||||
}
|
||||
|
||||
void PopupChatDialog::colorChanged(const QColor &c)
|
||||
|
@ -92,6 +92,7 @@ private:
|
||||
std::string lastChatName;
|
||||
|
||||
QHash<QString, QString> smileys;
|
||||
QColor currentColor;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::PopupChatDialog ui;
|
||||
|
@ -182,7 +182,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Italic</string>
|
||||
<string>Set Font</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
|
Loading…
Reference in New Issue
Block a user