mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 23:15:59 +00:00
gifs and pdfs attached by link, prepare for 0.8.54 stable version
This commit is contained in:
@@ -24,7 +24,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
FlatTextarea::FlatTextarea(QWidget *parent, const style::flatTextarea &st, const QString &pholder, const QString &v) : QTextEdit(v, parent),
|
||||
_ph(pholder), _oldtext(v), _phVisible(!v.length()),
|
||||
a_phLeft(_phVisible ? 0 : st.phShift), a_phAlpha(_phVisible ? 1 : 0), a_phColor(st.phColor->c),
|
||||
_st(st), _undoAvailable(false), _redoAvailable(false), _fakeMargin(0),
|
||||
_st(st), _undoAvailable(false), _redoAvailable(false), _inDrop(false), _fakeMargin(0),
|
||||
_touchPress(false), _touchRightButton(false), _touchMove(false), _replacingEmojis(false) {
|
||||
setAcceptRichText(false);
|
||||
resize(_st.width, _st.font->height);
|
||||
@@ -530,7 +530,7 @@ QStringList FlatTextarea::linksList() const {
|
||||
|
||||
void FlatTextarea::insertFromMimeData(const QMimeData *source) {
|
||||
QTextEdit::insertFromMimeData(source);
|
||||
emit spacedReturnedPasted();
|
||||
if (!_inDrop) emit spacedReturnedPasted();
|
||||
}
|
||||
|
||||
void FlatTextarea::insertEmoji(EmojiPtr emoji, QTextCursor c) {
|
||||
@@ -818,3 +818,10 @@ void FlatTextarea::resizeEvent(QResizeEvent *e) {
|
||||
void FlatTextarea::mousePressEvent(QMouseEvent *e) {
|
||||
QTextEdit::mousePressEvent(e);
|
||||
}
|
||||
|
||||
void FlatTextarea::dropEvent(QDropEvent *e) {
|
||||
_inDrop = true;
|
||||
QTextEdit::dropEvent(e);
|
||||
_inDrop = false;
|
||||
emit spacedReturnedPasted();
|
||||
}
|
||||
|
Reference in New Issue
Block a user