fix: fix chat input size and postiion
This commit is contained in:
parent
dd6454f55c
commit
1b3314ea9a
|
@ -11,6 +11,8 @@ Item {
|
|||
|
||||
id: chatButtonsContainer
|
||||
|
||||
width: chatSendBtn.width + emojiIconContainer.width + 2 * iconPadding
|
||||
|
||||
Button {
|
||||
id: chatSendBtn
|
||||
visible: txtData.length > 0
|
||||
|
@ -30,8 +32,8 @@ Item {
|
|||
}
|
||||
SVGImage {
|
||||
source: "../../../img/arrowUp.svg"
|
||||
width: 12
|
||||
// fillMode: Image.PreserveAspectFit
|
||||
width: 13
|
||||
height: 17
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
@ -155,6 +157,6 @@ Item {
|
|||
}
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;autoSize:true;height:480;width:640}
|
||||
D{i:0;formeditorColor:"#ffffff";formeditorZoom:1.75}
|
||||
}
|
||||
##^##*/
|
||||
|
|
|
@ -7,7 +7,9 @@ import "../../../../shared"
|
|||
import "../../../../imports"
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
border.width: 0
|
||||
height: 52
|
||||
|
||||
visible: chatsModel.activeChannel.chatType !== Constants.chatTypePrivateGroupChat || chatsModel.activeChannel.isMember(profileModel.profile.pubKey)
|
||||
|
||||
|
@ -23,27 +25,30 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 0
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
ScrollView {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
id: scrollView
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.right: sendBtns.left
|
||||
anchors.rightMargin: 0
|
||||
|
||||
StyledTArea {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
textFormat: TextArea.PlainText
|
||||
Layout.preferredWidth: parent.width - sendBtns.width
|
||||
|
||||
id: txtData
|
||||
text: ""
|
||||
selectByMouse: true
|
||||
topPadding: Style.current.padding
|
||||
|
||||
anchors.top: parent.top
|
||||
// The normal padding doesn't work for some reason
|
||||
topPadding: Style.current.padding + 9
|
||||
leftPadding: 12
|
||||
rightPadding: Style.current.padding
|
||||
font.pixelSize: 14
|
||||
|
||||
font.pixelSize: 15
|
||||
//% "Type a message..."
|
||||
placeholderText: qsTrId("type-a-message")
|
||||
Keys.onPressed: onEnter(event)
|
||||
|
@ -55,20 +60,15 @@ Rectangle {
|
|||
|
||||
ChatButtons {
|
||||
id: sendBtns
|
||||
Layout.topMargin: 1
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 30 + Style.current.padding
|
||||
Layout.minimumWidth: 30 + Style.current.padding
|
||||
Layout.maximumWidth: 200
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
addToChat: function (text) {
|
||||
txtData.insert(txtData.length, text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:100;width:600}
|
||||
D{i:0;formeditorColor:"#ffffff";formeditorZoom:1.25}
|
||||
}
|
||||
##^##*/
|
||||
|
|
Loading…
Reference in New Issue