mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix formulation
This commit is contained in:
parent
8594dcd6c8
commit
b4cc326e78
|
@ -149,14 +149,20 @@ void AddFriendForm::onIdChanged(const QString &id)
|
||||||
bool isValidId = tId.isEmpty() || ToxId::isToxId(tId) || tId.contains(dnsIdExpression);
|
bool isValidId = tId.isEmpty() || ToxId::isToxId(tId) || tId.contains(dnsIdExpression);
|
||||||
|
|
||||||
QString toxIdText(tr("Tox ID", "Tox ID of the person you're sending a friend request to"));
|
QString toxIdText(tr("Tox ID", "Tox ID of the person you're sending a friend request to"));
|
||||||
QString toxIdComment(tr("it must have length of 76 hexadecimal characters or similar name@domain.com", "Tox ID format description"));
|
QString toxIdComment(tr("either 76 hexadecimal characters or name@domain.com", "Tox ID format description"));
|
||||||
|
|
||||||
if(isValidId)
|
if(isValidId)
|
||||||
{
|
{
|
||||||
toxIdLabel.setText(toxIdText + QStringLiteral(" (") + toxIdComment + QStringLiteral(")"));
|
toxIdLabel.setText(toxIdText +
|
||||||
|
QStringLiteral(" (") +
|
||||||
|
toxIdComment +
|
||||||
|
QStringLiteral(")"));
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
toxIdLabel.setText(toxIdText + QStringLiteral(" <font color='red'>(") + toxIdComment + QStringLiteral(")</font>"));
|
toxIdLabel.setText(toxIdText +
|
||||||
|
QStringLiteral(" <font color='red'>(") +
|
||||||
|
toxIdComment +
|
||||||
|
QStringLiteral(")</font>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
toxId.setStyleSheet(isValidId ? QStringLiteral("") : QStringLiteral("QLineEdit { background-color: #FFC1C1; }"));
|
toxId.setStyleSheet(isValidId ? QStringLiteral("") : QStringLiteral("QLineEdit { background-color: #FFC1C1; }"));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user