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:
parent
a4a8e361d0
commit
89cb24254d
|
@ -93,14 +93,19 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString& sender, const QSt
|
|||
|
||||
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();
|
||||
|
||||
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)
|
||||
{
|
||||
color = authorColor[sender];
|
||||
}
|
||||
}
|
||||
|
||||
msg->addColumn(new Text(senderText, authorFont, true, sender,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ private slots:
|
|||
|
||||
void on_txtChatFont_currentFontChanged(const QFont& f);
|
||||
void on_txtChatFontSize_valueChanged(int arg1);
|
||||
void on_useNameColors_stateChanged(int arg1);
|
||||
void on_useNameColors_stateChanged(int value);
|
||||
|
||||
private:
|
||||
void retranslateUi();
|
||||
|
|
Loading…
Reference in New Issue
Block a user