Refactor Composer
- Have a simple HTextArea component instead of HScrollTextArea - Split composer parts between multiple files
This commit is contained in:
51
src/gui/Pages/Chat/Composer/Composer.qml
Normal file
51
src/gui/Pages/Chat/Composer/Composer.qml
Normal file
@@ -0,0 +1,51 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import "../../../Base"
|
||||
|
||||
Rectangle {
|
||||
property alias eventList: messageArea.eventList
|
||||
|
||||
|
||||
function takeFocus() { messageArea.forceActiveFocus() }
|
||||
|
||||
|
||||
implicitHeight:
|
||||
Math.max(theme.baseElementsHeight, messageArea.implicitHeight)
|
||||
|
||||
color: theme.chat.composer.background
|
||||
|
||||
|
||||
HRowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
HUserAvatar {
|
||||
id: avatar
|
||||
radius: 0
|
||||
userId: messageArea.writingUserId
|
||||
|
||||
mxc:
|
||||
messageArea.writingUserInfo ?
|
||||
messageArea.writingUserInfo.avatar_url :
|
||||
""
|
||||
|
||||
displayName:
|
||||
messageArea.writingUserInfo ?
|
||||
messageArea.writingUserInfo.display_name :
|
||||
""
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
MessageArea { id: messageArea}
|
||||
}
|
||||
|
||||
UploadButton {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user