roomlist: Fix ListSectionDelegate usage
The default property of ListSectionDelegate is already an alias to the RowLayout.data and trying to use RoomLayout.children didn't work as expected.
This commit is contained in:
committed by
Tobias Fella
parent
0e55c3b38f
commit
dabd6291a5
@@ -197,18 +197,22 @@ Kirigami.Page {
|
|||||||
activeSpaceId: spaceDrawer.selectedSpaceId
|
activeSpaceId: spaceDrawer.selectedSpaceId
|
||||||
}
|
}
|
||||||
|
|
||||||
section.property: sortFilterRoomListModel.filterText.length === 0 && !Config.mergeRoomList ? "category" : null
|
section {
|
||||||
section.delegate: root.collapsed ? foldButton : sectionHeader
|
property: sortFilterRoomListModel.filterText.length === 0 && !Config.mergeRoomList ? "category" : null
|
||||||
|
delegate: root.collapsed ? foldButton : sectionHeader
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: sectionHeader
|
id: sectionHeader
|
||||||
Kirigami.ListSectionHeader {
|
Kirigami.ListSectionHeader {
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
|
width: listView.width
|
||||||
label: roomListModel.categoryName(section)
|
label: roomListModel.categoryName(section)
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
onTriggered: roomListModel.setCategoryVisible(section, !roomListModel.categoryVisible(section))
|
onTriggered: roomListModel.setCategoryVisible(section, !roomListModel.categoryVisible(section))
|
||||||
}
|
}
|
||||||
contentItem.children: QQC2.ToolButton {
|
|
||||||
|
QQC2.ToolButton {
|
||||||
icon {
|
icon {
|
||||||
name: roomListModel.categoryVisible(section) ? "go-up" : "go-down"
|
name: roomListModel.categoryVisible(section) ? "go-up" : "go-down"
|
||||||
width: Kirigami.Units.iconSizes.small
|
width: Kirigami.Units.iconSizes.small
|
||||||
|
|||||||
Reference in New Issue
Block a user