Update the look of the chatbar to be floating with the rich text controls on top and send buttons inline
This commit is contained in:
@@ -174,6 +174,11 @@ void ChatBarMessageContentModel::connectKeyHelper()
|
||||
insertComponentAtCursor(MessageComponentType::Text);
|
||||
}
|
||||
});
|
||||
connect(m_keyHelper, &ChatKeyHelper::unhandledReturn, this, [this](bool isCompleting) {
|
||||
if (!isCompleting) {
|
||||
postMessage();
|
||||
}
|
||||
});
|
||||
connect(m_keyHelper, &ChatKeyHelper::imagePasted, this, [this](const QString &filePath) {
|
||||
m_room->cacheForType(m_type)->setAttachmentPath(filePath);
|
||||
});
|
||||
@@ -448,6 +453,21 @@ void ChatBarMessageContentModel::removeAttachment()
|
||||
}
|
||||
}
|
||||
|
||||
bool ChatBarMessageContentModel::sendMessageWithEnter() const
|
||||
{
|
||||
return m_sendMessageWithEnter;
|
||||
}
|
||||
|
||||
void ChatBarMessageContentModel::setSendMessageWithEnter(bool sendMessageWithEnter)
|
||||
{
|
||||
if (sendMessageWithEnter == m_sendMessageWithEnter) {
|
||||
return;
|
||||
}
|
||||
m_sendMessageWithEnter = sendMessageWithEnter;
|
||||
m_keyHelper->sendMessageWithEnter = sendMessageWithEnter;
|
||||
Q_EMIT sendMessageWithEnterChanged();
|
||||
}
|
||||
|
||||
ChatBarMessageContentModel::ComponentIt ChatBarMessageContentModel::removeComponent(ComponentIt it)
|
||||
{
|
||||
if (it == m_components.end()) {
|
||||
|
||||
Reference in New Issue
Block a user