From f080eb12e7a48359e5aa1ed352082a4d6e9cedcb Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 23 Jul 2014 23:41:05 +0200 Subject: [PATCH 1/2] added placeholder text for chat input widget --- widget/tool/chattextedit.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widget/tool/chattextedit.cpp b/widget/tool/chattextedit.cpp index face13191..8f727cfbb 100644 --- a/widget/tool/chattextedit.cpp +++ b/widget/tool/chattextedit.cpp @@ -20,6 +20,7 @@ ChatTextEdit::ChatTextEdit(QWidget *parent) : QTextEdit(parent) { + setPlaceholderText("Type your message here..."); } void ChatTextEdit::keyPressEvent(QKeyEvent * event) From 9c0af06c0b41ad64136527b221e0defecacc4ab8 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 23 Jul 2014 23:52:55 +0200 Subject: [PATCH 2/2] use default invite message as placeholder text --- widget/form/addfriendform.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/form/addfriendform.cpp b/widget/form/addfriendform.cpp index 76072b230..d83e9b5b3 100644 --- a/widget/form/addfriendform.cpp +++ b/widget/form/addfriendform.cpp @@ -35,6 +35,7 @@ AddFriendForm::AddFriendForm() : dns(this) toxIdLabel.setText(tr("Tox ID","Tox ID of the person you're sending a friend request to")); messageLabel.setText(tr("Message","The message you send in friend requests")); sendButton.setText(tr("Send friend request")); + message.setPlaceholderText(tr("Tox me maybe?","Default message in friend requests if the field is left blank. Write something appropriate!")); main->setLayout(&layout); layout.addWidget(&toxIdLabel); @@ -81,7 +82,7 @@ void AddFriendForm::showWarning(const QString &message) const QString AddFriendForm::getMessage() const { const QString msg = message.toPlainText(); - return !msg.isEmpty() ? msg : tr("Tox me maybe?","Default message in friend requests if the field is left blank. Write something appropriate!"); + return !msg.isEmpty() ? msg : message.placeholderText(); } void AddFriendForm::onSendTriggered()