1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(ui): fix anything

This commit is contained in:
Monsterovich 2018-10-24 00:17:06 +02:00
parent a4a8e361d0
commit 89cb24254d
3 changed files with 10 additions and 5 deletions

View File

@ -93,14 +93,19 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString& sender, const QSt
if (colorizeName && Settings::getInstance().getEnableGroupChatsColor()) if (colorizeName && Settings::getInstance().getEnableGroupChatsColor())
{ {
QByteArray hash = QCryptographicHash::hash((sender.toUtf8()), QCryptographicHash::Md5); QByteArray hash = QCryptographicHash::hash((sender.toUtf8()), QCryptographicHash::Sha256);
quint8 *data = (quint8*)hash.data(); quint8 *data = (quint8*)hash.data();
if (!authorColor[sender].isValid()) if (!authorColor[sender].isValid())
authorColor[sender] = QColor(data[0], data[1], data[2]); {
color.setHsv(data[0], data[1], data[2]);
authorColor[sender] = color;
}
if (!isMe) if (!isMe)
{
color = authorColor[sender]; color = authorColor[sender];
}
} }
msg->addColumn(new Text(senderText, authorFont, true, sender, msg->addColumn(new Text(senderText, authorFont, true, sender,

View File

@ -376,7 +376,7 @@ void UserInterfaceForm::on_txtChatFontSize_valueChanged(int px)
} }
} }
void UserInterfaceForm::on_useNameColors_stateChanged(int arg1) void UserInterfaceForm::on_useNameColors_stateChanged(int value)
{ {
Settings::getInstance().setEnableGroupChatsColor(arg1); Settings::getInstance().setEnableGroupChatsColor(value);
} }

View File

@ -62,7 +62,7 @@ private slots:
void on_txtChatFont_currentFontChanged(const QFont& f); void on_txtChatFont_currentFontChanged(const QFont& f);
void on_txtChatFontSize_valueChanged(int arg1); void on_txtChatFontSize_valueChanged(int arg1);
void on_useNameColors_stateChanged(int arg1); void on_useNameColors_stateChanged(int value);
private: private:
void retranslateUi(); void retranslateUi();