Prevent TypingMembersBar text from overflowing

This commit is contained in:
miruka 2019-07-10 00:18:50 -04:00
parent 58ebe6475e
commit e2696ea928

View File

@ -6,6 +6,8 @@ import QtQuick.Layouts 1.3
import "../Base" import "../Base"
HRectangle { HRectangle {
id: typingMembersBar
property alias label: typingLabel property alias label: typingLabel
color: theme.chat.typingMembers.background color: theme.chat.typingMembers.background
@ -22,6 +24,7 @@ HRectangle {
bottomPadding: 2 bottomPadding: 2
HIcon { HIcon {
id: icon
svgName: "typing" // TODO: animate svgName: "typing" // TODO: animate
height: typingLabel.height height: typingLabel.height
} }
@ -30,8 +33,10 @@ HRectangle {
id: typingLabel id: typingLabel
text: chatPage.roomInfo.typingText text: chatPage.roomInfo.typingText
textFormat: Text.StyledText textFormat: Text.StyledText
elide: Text.ElideMiddle elide: Text.ElideRight
maximumLineCount: 1 maximumLineCount: 1
width: typingMembersBar.width - icon.width -
parent.spacing - parent.leftPadding - parent.rightPadding
} }
} }
} }