Update the RoomTreeSection to use standard Kirigami.ListSectionHeader
This commit is contained in:
@@ -37,28 +37,13 @@ QQC2.ItemDelegate {
|
|||||||
Keys.onReturnPressed: root.treeView.toggleExpanded(row)
|
Keys.onReturnPressed: root.treeView.toggleExpanded(row)
|
||||||
Keys.onSpacePressed: root.treeView.toggleExpanded(row)
|
Keys.onSpacePressed: root.treeView.toggleExpanded(row)
|
||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: Kirigami.ListSectionHeader {
|
||||||
spacing: Kirigami.Units.largeSpacing
|
visible: !root.collapsed
|
||||||
|
horizontalPadding: 0
|
||||||
|
topPadding: 0
|
||||||
|
bottomPadding: 0
|
||||||
|
text: root.collapsed ? "" : root.displayName
|
||||||
|
|
||||||
Kirigami.Heading {
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
visible: !root.collapsed
|
|
||||||
|
|
||||||
opacity: 0.7
|
|
||||||
level: 5
|
|
||||||
type: Kirigami.Heading.Primary
|
|
||||||
text: root.collapsed ? "" : model.displayName
|
|
||||||
elide: Text.ElideRight
|
|
||||||
|
|
||||||
// we override the Primary type's font weight (DemiBold) for Bold for contrast with small text
|
|
||||||
font.weight: Font.Bold
|
|
||||||
}
|
|
||||||
|
|
||||||
Kirigami.Separator {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
visible: !root.collapsed
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
}
|
|
||||||
QQC2.ToolButton {
|
QQC2.ToolButton {
|
||||||
id: collapseButton
|
id: collapseButton
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|||||||
Reference in New Issue
Block a user