Visual unread mentions counter

This commit is contained in:
miruka
2020-03-22 23:55:48 -04:00
parent 367fff8f4a
commit ef2504ecae
6 changed files with 71 additions and 20 deletions

View File

@@ -6,6 +6,7 @@ import QtQuick.Layouts 1.12
HButton {
id: tile
signal leftClicked()
signal rightClicked()
@@ -24,6 +25,7 @@ HButton {
property Component image
contentItem: HRowLayout {
id: contentItem
spacing: tile.spacing
@@ -50,34 +52,37 @@ HButton {
Layout.fillHeight: true
}
HLabel {
id: rightInfo
font.pixelSize: theme.fontSize.small
verticalAlignment: Qt.AlignVCenter
color: theme.colors.halfDimText
visible: Layout.maximumWidth > 0
Layout.fillHeight: true
Layout.maximumWidth:
text && tile.width >= 200 * theme.uiScale ?
implicitWidth : 0
Behavior on Layout.maximumWidth { HNumberAnimation {} }
}
HRowLayout {
id: additionalInfo
visible: visibleChildren.length > 0
}
HLabel {
id: rightInfo
font.pixelSize: theme.fontSize.small
color: theme.colors.halfDimText
visible: Layout.maximumWidth > 0
Layout.fillHeight: true
Layout.maximumWidth:
text && tile.width >= 160 * theme.uiScale ?
implicitWidth : 0
Behavior on Layout.maximumWidth { HNumberAnimation {} }
}
}
HRichLabel {
id: subtitle
textFormat: Text.StyledText
font.pixelSize: theme.fontSize.small
verticalAlignment: Qt.AlignVCenter
elide: Text.ElideRight
color: theme.colors.dimText
visible: Layout.maximumHeight > 0
Layout.maximumHeight: ! compact && text ? implicitHeight : 0
Layout.fillWidth: true
Layout.fillHeight: true