2022-07-19 13:45:27 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property alias primaryText: primaryText.text
|
|
|
|
property alias secondaryText: secondaryText.text
|
2022-08-08 21:12:12 +00:00
|
|
|
property alias primaryLabel: primaryText
|
|
|
|
property alias secondaryLabel: secondaryText
|
2022-07-19 13:45:27 +00:00
|
|
|
property alias tagsModel: tags.model
|
|
|
|
property alias tagsDelegate: tags.delegate
|
|
|
|
property int maxWidth: 0
|
|
|
|
|
|
|
|
implicitHeight: 52
|
|
|
|
implicitWidth: layout.width + Style.current.xlPadding
|
|
|
|
radius: Style.current.radius
|
|
|
|
border.width: 1
|
|
|
|
border.color: Theme.palette.baseColor2
|
|
|
|
color: Style.current.transparent
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: layout
|
2022-07-28 20:56:44 +00:00
|
|
|
spacing: 0
|
2022-07-19 13:45:27 +00:00
|
|
|
anchors.centerIn: parent
|
|
|
|
StatusBaseText {
|
|
|
|
id: primaryText
|
|
|
|
Layout.maximumWidth: root.maxWidth - Style.current.xlPadding
|
|
|
|
font.pixelSize: 13
|
|
|
|
color: Theme.palette.directColor5
|
|
|
|
visible: text
|
|
|
|
elide: Text.ElideRight
|
|
|
|
}
|
|
|
|
StatusBaseText {
|
|
|
|
id: secondaryText
|
|
|
|
Layout.maximumWidth: root.maxWidth - Style.current.xlPadding
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
visible: text
|
|
|
|
elide: Text.ElideRight
|
|
|
|
}
|
|
|
|
ScrollView {
|
|
|
|
Layout.preferredHeight: 24
|
|
|
|
Layout.maximumWidth: root.maxWidth - Style.current.xlPadding
|
|
|
|
clip: true
|
|
|
|
visible: tags.count > 0
|
|
|
|
ListView {
|
|
|
|
id: tags
|
|
|
|
orientation: ListView.Horizontal
|
|
|
|
spacing: 10
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|