From 3d83a7d995ba9c119693e7ad295ec7132d930aeb Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Thu, 21 Aug 2025 15:08:37 +0200 Subject: [PATCH] ExploreRoomsPage: Replace "Add room manually" delegate with a button in the header --- src/libneochat/qml/ExploreRoomsPage.qml | 29 +++++++++---------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/libneochat/qml/ExploreRoomsPage.qml b/src/libneochat/qml/ExploreRoomsPage.qml index 794270f79..987503295 100644 --- a/src/libneochat/qml/ExploreRoomsPage.qml +++ b/src/libneochat/qml/ExploreRoomsPage.qml @@ -56,6 +56,16 @@ SearchPage { Component.onCompleted: focusSearch() headerTrailing: RowLayout { + QQC2.Button { + icon.name: "list-add" + text: i18nc("@action:button", "Enter room by address") + display: QQC2.Button.IconOnly + + QQC2.ToolTip.text: text + QQC2.ToolTip.visible: hovered + QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay + onClicked: _private.openManualRoomDialog() + } QQC2.Button { id: spacesOnlyButton icon.name: "globe" @@ -88,25 +98,6 @@ SearchPage { } } - listHeaderDelegate: Delegates.RoundedItemDelegate { - id: delegate - - onClicked: _private.openManualRoomDialog() - - activeFocusOnTab: false // We handle moving to this item via up/down arrows, otherwise the tab order is wacky - text: i18n("Enter a Room Manually") - visible: publicRoomListModel.redirectedText.length === 0 - icon.name: "compass" - icon.width: Kirigami.Units.gridUnit * 2 - icon.height: Kirigami.Units.gridUnit * 2 - - contentItem: Kirigami.IconTitleSubtitle { - icon: icon.fromControlsIcon(delegate.icon) - title: delegate.text - subtitle: i18n("If you already know a room's address or alias, and it isn't shown here.") - } - } - listFooterDelegate: QQC2.ProgressBar { width: ListView.view.width leftInset: Kirigami.Units.largeSpacing