From 706809d12a62203eb078e290d73bdeabd45dcc07 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sun, 1 Jan 2023 23:39:31 +0100 Subject: [PATCH] Make space list smaller Signed-off-by: Carl Schwan --- src/qml/Page/RoomListPage.qml | 46 ++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/qml/Page/RoomListPage.qml b/src/qml/Page/RoomListPage.qml index 87d405f32..fe0c3f48b 100644 --- a/src/qml/Page/RoomListPage.qml +++ b/src/qml/Page/RoomListPage.qml @@ -28,7 +28,7 @@ Kirigami.ScrollablePage { clip: true visible: spaceList.count > 0 - Layout.preferredHeight: Kirigami.Units.gridUnit * 3 + Layout.preferredHeight: Kirigami.Units.gridUnit * 2 Layout.fillWidth: true model: SortFilterSpaceListModel { @@ -39,26 +39,28 @@ Kirigami.ScrollablePage { } } - header: QQC2.Control { - contentItem: QQC2.RoundButton { - id: homeButton - flat: true - padding: Kirigami.Units.gridUnit / 2 - icon.name: "home" - text: i18nc("@action:button", "Show All Rooms") - display: QQC2.AbstractButton.IconOnly + header: QQC2.ItemDelegate { + id: homeButton + icon.name: "home" + text: i18nc("@action:button", "Show All Rooms") + height: parent.height + width: height + leftPadding: topPadding + rightPadding: topPadding - onClicked: { - sortFilterRoomListModel.activeSpaceId = ""; - spaceList.activeSpaceId = ''; - listView.positionViewAtIndex(0, ListView.Beginning); - } - - QQC2.ToolTip { - text: homeButton.text - } - Accessible.name: text + contentItem: Kirigami.Icon { + source: "home" } + + onClicked: { + sortFilterRoomListModel.activeSpaceId = ""; + spaceList.activeSpaceId = ''; + listView.positionViewAtIndex(0, ListView.Beginning); + } + + QQC2.ToolTip.text: homeButton.text + QQC2.ToolTip.visible: hovered + QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay } delegate: QQC2.ItemDelegate { @@ -84,9 +86,9 @@ Kirigami.ScrollablePage { Accessible.name: currentRoom.displayName - QQC2.ToolTip { - text: currentRoom.displayName - } + QQC2.ToolTip.text: currentRoom.displayName + QQC2.ToolTip.visible: hovered + QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay onPressAndHold: { spaceList.createContextMenu(currentRoom)