Improve TypingMembersBar

This commit is contained in:
miruka
2019-07-06 17:29:32 -04:00
parent 556749aa35
commit 388967c737
10 changed files with 39 additions and 17 deletions

View File

@@ -55,7 +55,10 @@ HColumnLayout {
Layout.fillHeight: true
}
TypingMembersBar {}
TypingMembersBar {
Layout.fillWidth: true
//Layout.preferredHeight: text ? implicitHeight : 0
}
InviteBanner {
visible: category === "Invites"

View File

@@ -27,6 +27,7 @@ HRectangle {
HScrollableTextArea {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.topMargin: Math.max(0, root.Layout.minimumHeight - 34)
id: textArea
placeholderText: qsTr("Type a message...")

View File

@@ -75,12 +75,6 @@ Column {
width: roomEventDelegate.width
}
Item { // TODO: put this in Daybreak.qml?
visible: dayBreak
width: parent.width
height: topPadding
}
EventContent {
anchors.right: isOwn ? parent.right : undefined
}

View File

@@ -3,6 +3,8 @@ import SortFilterProxyModel 0.2
import "../../Base"
HRectangle {
property alias listView: roomEventListView
property int space: 8
color: HStyle.chat.roomEventList.background

View File

@@ -3,17 +3,30 @@ import QtQuick.Layouts 1.3
import "../Base"
HRectangle {
property alias label: typingLabel
implicitWidth: childrenRect.width
implicitHeight: typingLabel.text ? childrenRect.height : 0
color: HStyle.chat.typingMembers.background
Layout.fillWidth: true
Layout.preferredHeight: usersLabel.text ? usersLabel.implicitHeight : 0
Row {
spacing: 8
leftPadding: spacing
rightPadding: spacing
topPadding: 2
bottomPadding: 2
HLabel {
id: usersLabel
anchors.fill: parent
HIcon {
svgName: "typing" // TODO: animate
height: typingLabel.height
}
text: chatPage.roomInfo.typingText
elide: Text.ElideMiddle
maximumLineCount: 1
HLabel {
id: typingLabel
text: chatPage.roomInfo.typingText
textFormat: Text.StyledText
elide: Text.ElideMiddle
maximumLineCount: 1
}
}
}