From 10da870ab3e50e65d70e3d4d0ff1faf4708568f1 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sun, 15 May 2022 14:17:38 +0100 Subject: [PATCH] Fix search item being behind the roomlist in collapsed mode by moving code into ListView. Now the search item is always at the top of the list. --- imports/NeoChat/Page/RoomListPage.qml | 50 +++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/imports/NeoChat/Page/RoomListPage.qml b/imports/NeoChat/Page/RoomListPage.qml index 396c47c1e..0a3565a8d 100644 --- a/imports/NeoChat/Page/RoomListPage.qml +++ b/imports/NeoChat/Page/RoomListPage.qml @@ -68,31 +68,6 @@ Kirigami.ScrollablePage { } } - header: QQC2.ItemDelegate { - visible: page.collapsedMode - action: Kirigami.Action { - id: enterRoomAction - onTriggered: quickView.item.open(); - } - topPadding: Kirigami.Units.largeSpacing - leftPadding: Kirigami.Units.largeSpacing - rightPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing - width: visible ? page.width : 0 - height: visible ? Kirigami.Units.gridUnit * 2 : 0 - - Kirigami.Icon { - anchors.centerIn: parent - width: 22 - height: 22 - source: "search" - } - Kirigami.Separator { - width: parent.width - anchors.bottom: parent.bottom - } - } - ListView { id: listView @@ -100,6 +75,31 @@ Kirigami.ScrollablePage { activeFocusOnTab: true clip: accountList.count > 1 + header: QQC2.ItemDelegate { + visible: page.collapsedMode + action: Kirigami.Action { + id: enterRoomAction + onTriggered: quickView.item.open(); + } + topPadding: Kirigami.Units.largeSpacing + leftPadding: Kirigami.Units.largeSpacing + rightPadding: Kirigami.Units.largeSpacing + bottomPadding: Kirigami.Units.largeSpacing + width: visible ? page.width : 0 + height: visible ? Kirigami.Units.gridUnit * 2 : 0 + + Kirigami.Icon { + anchors.centerIn: parent + width: 22 + height: 22 + source: "search" + } + Kirigami.Separator { + width: parent.width + anchors.bottom: parent.bottom + } + } + Kirigami.PlaceholderMessage { anchors.centerIn: parent width: parent.width - (Kirigami.Units.largeSpacing * 4)