Replace Global Menu

Remove the global menu and move explore and new chat/room buttons to new `ExploreComponent.qml`.

This is designed to sit in the header of the `RoomListPage` and will only be visible when the room list is. The other settings have just been removed as they are covered by the `UserInfo` component and quick can be done form the decoration or system tray.

When wide\
![image](/uploads/ae652b4beeae8cbde0def427fbc65112/image.png)

Collapsed mode\
![image](/uploads/0aac45d8fa1dd718afd764656dded76b/image.png)
This commit is contained in:
James Graham
2023-02-27 20:11:50 +00:00
parent ac88e13e58
commit 178b516c7c
4 changed files with 134 additions and 71 deletions

View File

@@ -115,8 +115,6 @@ Kirigami.ScrollablePage {
}
}
title: i18n("Rooms")
property var enteredRoom
property bool collapsedMode: Config.roomListPageWidth < applicationWindow().minPageWidth && applicationWindow().shouldUseSidebars
@@ -169,23 +167,10 @@ Kirigami.ScrollablePage {
goToPreviousRoomFiltered((item) => (item.visible && item.hasUnread));
}
titleDelegate: collapsedMode ? empty : searchField
Component {
id: empty
Item {}
}
Component {
id: searchField
Kirigami.SearchField {
Layout.topMargin: Kirigami.Units.smallSpacing
Layout.bottomMargin: Kirigami.Units.smallSpacing
Layout.fillHeight: true
Layout.fillWidth: true
onTextChanged: sortFilterRoomListModel.filterText = text
KeyNavigation.tab: listView
}
titleDelegate: ExploreComponent {
Layout.fillWidth: true
desiredWidth: page.width - Kirigami.Units.largeSpacing
collapsed: collapsedMode
}
ListView {