ExploreRoomsPage: Replace "Add room manually" delegate with a button in the header

This commit is contained in:
Tobias Fella
2025-08-21 15:08:37 +02:00
parent 1bd39f282e
commit 3d83a7d995

View File

@@ -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