Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(ui): fix anything
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Oct 25, 2018
1 parent a4a8e36 commit 89cb242
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/chatlog/chatmessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/widget/form/settings/userinterfaceform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion src/widget/form/settings/userinterfaceform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 89cb242

Please sign in to comment.