Browse Source

feat(UI): make it possible to select text of the received friend request

pull/3958/head
Zetok Zalbavar 9 years ago
parent
commit
0660695873
No known key found for this signature in database
GPG Key ID: C953D3880212068A
  1. 4
      src/widget/form/addfriendform.cpp

4
src/widget/form/addfriendform.cpp

@ -308,10 +308,14 @@ void AddFriendForm::addFriendRequestWidget(const QString &friendAddress, const Q @@ -308,10 +308,14 @@ void AddFriendForm::addFriendRequestWidget(const QString &friendAddress, const Q
friendLayout->addLayout(horLayout);
CroppingLabel* friendLabel = new CroppingLabel(friendWidget);
friendLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
friendLabel->setText("<b>" + friendAddress + "</b>");
horLayout->addWidget(friendLabel);
QLabel* messageLabel = new QLabel(message);
// allow to select text, but treat links as plaintext to prevent phishing
messageLabel->setTextInteractionFlags(Qt::TextSelectableByMouse |
Qt::TextSelectableByKeyboard);
messageLabel->setTextFormat(Qt::PlainText);
messageLabel->setWordWrap(true);
horLayout->addWidget(messageLabel, 1);

Loading…
Cancel
Save