chatgui: invite link dialogs, zxing-cpp QR code, crypto transport, channel improvements; msg_transport: chat protocol support
This commit is contained in:
1 parent
d8c8c1c5b0
commit
22c24d135e
2206 files changed
+33191
-257
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#include <QTextEdit>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QFileDialog>
|
||||
#include <QKeyEvent>
|
||||
#include <QFontMetrics>
|
||||
@@ -23,6 +24,16 @@ static QPushButton *makeIconBtn(const QString &text, const QString &tooltip, QWi
|
||||
return btn;
|
||||
}
|
||||
|
||||
static QWidget *wrapBottomBtn(QPushButton *btn, int pad) {
|
||||
auto *w = new QWidget(btn->parentWidget());
|
||||
auto *l = new QVBoxLayout(w);
|
||||
l->setContentsMargins(0, 0, 0, 0);
|
||||
l->setSpacing(0);
|
||||
l->addWidget(btn);
|
||||
l->addSpacing(pad);
|
||||
return w;
|
||||
}
|
||||
|
||||
InputBar::InputBar(EmojiPanel *emojiPanel, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_input(new QTextEdit(this))
|
||||
@@ -41,7 +52,7 @@ InputBar::InputBar(EmojiPanel *emojiPanel, QWidget *parent)
|
||||
qDebug() << "Attached:" << path;
|
||||
}
|
||||
});
|
||||
layout->addWidget(attachBtn, 0, Qt::AlignBottom);
|
||||
layout->addWidget(wrapBottomBtn(attachBtn, 3), 0, Qt::AlignBottom);
|
||||
|
||||
m_input->setAcceptRichText(false);
|
||||
m_input->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
@@ -58,7 +69,7 @@ InputBar::InputBar(EmojiPanel *emojiPanel, QWidget *parent)
|
||||
|
||||
m_emojiBtn = makeIconBtn(QString::fromUtf8("\xF0\x9F\x99\x82"),
|
||||
QString::fromUtf8("Смайлики"), this);
|
||||
layout->addWidget(m_emojiBtn, 0, Qt::AlignBottom);
|
||||
layout->addWidget(wrapBottomBtn(m_emojiBtn, 3), 0, Qt::AlignBottom);
|
||||
|
||||
auto *sendBtn = makeIconBtn(QString::fromUtf8("\xE2\x9E\xA4"),
|
||||
QString::fromUtf8("Отправить"), this);
|
||||
|
||||
Reference in new issue
Block a user