diff --git a/TODO.md b/TODO.md index 709a781f..0745a133 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,3 @@ -- ElidedLabel component - Can set `Layout.fillWidth: true` to elide/wrap - Use childrenRect stuff - Rename theme.bottomElementsHeight diff --git a/src/qml/Base/HLabel.qml b/src/qml/Base/HLabel.qml index 75c249ff..42a3009e 100644 --- a/src/qml/Base/HLabel.qml +++ b/src/qml/Base/HLabel.qml @@ -11,4 +11,6 @@ Label { color: theme.colors.foreground style: Label.Outline styleColor: theme.colors.textBorder + + maximumLineCount: elide == Label.ElideNone ? Number.MAX_VALUE : 1 } diff --git a/src/qml/Chat/Banners/Banner.qml b/src/qml/Chat/Banners/Banner.qml index 5d134f38..77c66beb 100644 --- a/src/qml/Chat/Banners/Banner.qml +++ b/src/qml/Chat/Banners/Banner.qml @@ -35,7 +35,6 @@ HRectangle { HLabel { id: bannerLabel textFormat: Text.StyledText - maximumLineCount: 1 elide: Text.ElideRight visible: diff --git a/src/qml/Chat/RoomHeader.qml b/src/qml/Chat/RoomHeader.qml index a3ed2b0a..261278f6 100644 --- a/src/qml/Chat/RoomHeader.qml +++ b/src/qml/Chat/RoomHeader.qml @@ -34,7 +34,6 @@ HRectangle { text: displayName font.pixelSize: theme.fontSize.big elide: Text.ElideRight - maximumLineCount: 1 Layout.maximumWidth: Math.max( 0, @@ -49,7 +48,6 @@ HRectangle { text: topic font.pixelSize: theme.fontSize.small elide: Text.ElideRight - maximumLineCount: 1 Layout.maximumWidth: Math.max( 0, diff --git a/src/qml/Chat/RoomSidePane/MemberDelegate.qml b/src/qml/Chat/RoomSidePane/MemberDelegate.qml index 09f938fc..9267866c 100644 --- a/src/qml/Chat/RoomSidePane/MemberDelegate.qml +++ b/src/qml/Chat/RoomSidePane/MemberDelegate.qml @@ -36,7 +36,6 @@ HHighlightRectangle { id: memberName text: memberInfo.displayName || model.userId elide: Text.ElideRight - maximumLineCount: 1 verticalAlignment: Qt.AlignVCenter Layout.maximumWidth: parent.width diff --git a/src/qml/Chat/Timeline/EventContent.qml b/src/qml/Chat/Timeline/EventContent.qml index 87143e45..881a5ce9 100644 --- a/src/qml/Chat/Timeline/EventContent.qml +++ b/src/qml/Chat/Timeline/EventContent.qml @@ -50,7 +50,6 @@ Row { text: senderInfo.displayName || model.senderId color: Utils.nameColor(avatar.name) elide: Text.ElideRight - maximumLineCount: 1 horizontalAlignment: isOwn ? Text.AlignRight : Text.AlignLeft leftPadding: horizontalPadding diff --git a/src/qml/Chat/TypingMembersBar.qml b/src/qml/Chat/TypingMembersBar.qml index 7f693ac6..a88a97d2 100644 --- a/src/qml/Chat/TypingMembersBar.qml +++ b/src/qml/Chat/TypingMembersBar.qml @@ -34,7 +34,6 @@ HRectangle { text: chatPage.roomInfo.typingText textFormat: Text.StyledText elide: Text.ElideRight - maximumLineCount: 1 width: typingMembersBar.width - icon.width - parent.spacing - parent.leftPadding - parent.rightPadding } diff --git a/src/qml/Pages/EditAccount/EditAccount.qml b/src/qml/Pages/EditAccount/EditAccount.qml index 16e0b7f7..0da03cf7 100644 --- a/src/qml/Pages/EditAccount/EditAccount.qml +++ b/src/qml/Pages/EditAccount/EditAccount.qml @@ -42,7 +42,6 @@ Page { textFormat: Text.StyledText font.pixelSize: theme.fontSize.big elide: Text.ElideRight - maximumLineCount: 1 horizontalAlignment: Text.AlignHCenter Layout.leftMargin: currentSpacing diff --git a/src/qml/SidePane/AccountDelegate.qml b/src/qml/SidePane/AccountDelegate.qml index 6691202f..ead57585 100644 --- a/src/qml/SidePane/AccountDelegate.qml +++ b/src/qml/SidePane/AccountDelegate.qml @@ -42,7 +42,6 @@ Column { id: accountLabel text: userInfo.displayName || model.userId elide: HLabel.ElideRight - maximumLineCount: 1 Layout.fillWidth: true leftPadding: sidePane.currentSpacing rightPadding: leftPadding diff --git a/src/qml/SidePane/RoomCategoryDelegate.qml b/src/qml/SidePane/RoomCategoryDelegate.qml index 8f92a420..15e003c6 100644 --- a/src/qml/SidePane/RoomCategoryDelegate.qml +++ b/src/qml/SidePane/RoomCategoryDelegate.qml @@ -28,7 +28,6 @@ Column { text: name font.weight: Font.DemiBold elide: Text.ElideRight - maximumLineCount: 1 Layout.leftMargin: sidePane.currentSpacing Layout.fillWidth: true diff --git a/src/qml/SidePane/RoomDelegate.qml b/src/qml/SidePane/RoomDelegate.qml index 21c05ec9..92872340 100644 --- a/src/qml/SidePane/RoomDelegate.qml +++ b/src/qml/SidePane/RoomDelegate.qml @@ -43,7 +43,6 @@ HHighlightRectangle { textFormat: model.displayName? Text.PlainText : Text.StyledText elide: Text.ElideRight - maximumLineCount: 1 verticalAlignment: Qt.AlignVCenter Layout.maximumWidth: parent.width @@ -73,7 +72,6 @@ HHighlightRectangle { font.pixelSize: theme.fontSize.small elide: Text.ElideRight - maximumLineCount: 1 Layout.maximumWidth: parent.width }