Make space list smaller

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
Carl Schwan
2023-01-01 23:39:31 +01:00
parent 3fc06c2a74
commit 706809d12a

View File

@@ -28,7 +28,7 @@ Kirigami.ScrollablePage {
clip: true clip: true
visible: spaceList.count > 0 visible: spaceList.count > 0
Layout.preferredHeight: Kirigami.Units.gridUnit * 3 Layout.preferredHeight: Kirigami.Units.gridUnit * 2
Layout.fillWidth: true Layout.fillWidth: true
model: SortFilterSpaceListModel { model: SortFilterSpaceListModel {
@@ -39,14 +39,18 @@ Kirigami.ScrollablePage {
} }
} }
header: QQC2.Control { header: QQC2.ItemDelegate {
contentItem: QQC2.RoundButton {
id: homeButton id: homeButton
flat: true
padding: Kirigami.Units.gridUnit / 2
icon.name: "home" icon.name: "home"
text: i18nc("@action:button", "Show All Rooms") text: i18nc("@action:button", "Show All Rooms")
display: QQC2.AbstractButton.IconOnly height: parent.height
width: height
leftPadding: topPadding
rightPadding: topPadding
contentItem: Kirigami.Icon {
source: "home"
}
onClicked: { onClicked: {
sortFilterRoomListModel.activeSpaceId = ""; sortFilterRoomListModel.activeSpaceId = "";
@@ -54,11 +58,9 @@ Kirigami.ScrollablePage {
listView.positionViewAtIndex(0, ListView.Beginning); listView.positionViewAtIndex(0, ListView.Beginning);
} }
QQC2.ToolTip { QQC2.ToolTip.text: homeButton.text
text: homeButton.text QQC2.ToolTip.visible: hovered
} QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
Accessible.name: text
}
} }
delegate: QQC2.ItemDelegate { delegate: QQC2.ItemDelegate {
@@ -84,9 +86,9 @@ Kirigami.ScrollablePage {
Accessible.name: currentRoom.displayName Accessible.name: currentRoom.displayName
QQC2.ToolTip { QQC2.ToolTip.text: currentRoom.displayName
text: currentRoom.displayName QQC2.ToolTip.visible: hovered
} QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
onPressAndHold: { onPressAndHold: {
spaceList.createContextMenu(currentRoom) spaceList.createContextMenu(currentRoom)