2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Unite InputField and InputArea.

Also support and use instant replaces in InputField-s.
This commit is contained in:
John Preston
2018-05-20 20:42:30 +03:00
parent 8e442563f2
commit 30dd8fe070
22 changed files with 771 additions and 1271 deletions

View File

@@ -760,13 +760,18 @@ void Notification::showReplyField() {
_background->setGeometry(0, st::notifyMinHeight, width(), st::notifySendReply.height + st::notifyBorderWidth);
_background->show();
_replyArea.create(this, st::notifyReplyArea, langFactory(lng_message_ph), QString());
_replyArea.create(
this,
st::notifyReplyArea,
Ui::InputField::Mode::MultiLine,
langFactory(lng_message_ph));
_replyArea->resize(width() - st::notifySendReply.width - 2 * st::notifyBorderWidth, st::notifySendReply.height);
_replyArea->moveToLeft(st::notifyBorderWidth, st::notifyMinHeight);
_replyArea->show();
_replyArea->setFocus();
_replyArea->setMaxLength(MaxMessageSize);
_replyArea->setCtrlEnterSubmit(Ui::CtrlEnterSubmit::Both);
_replyArea->setInstantReplaces(Ui::InstantReplaces::Default());
// Catch mouse press event to activate the window.
QCoreApplication::instance()->installEventFilter(this);