From d364c29c43dca128f516c5f7d4e925b27347f558 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 8 Jun 2021 22:18:51 +0200 Subject: Implement switching in narrow mode --- resources/qml/ChatPage.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'resources/qml/ChatPage.qml') diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml index e5b53738..0f884d75 100644 --- a/resources/qml/ChatPage.qml +++ b/resources/qml/ChatPage.qml @@ -14,8 +14,11 @@ Rectangle { color: Nheko.colors.window AdaptiveLayout { + id: adaptiveView + anchors.fill: parent singlePageMode: width < communityListC.maximumWidth + roomListC.maximumWidth + timlineViewC.minimumWidth + pageIndex: Rooms.currentRoom ? 2 : 1 AdaptiveLayoutElement { id: communityListC @@ -37,9 +40,12 @@ Rectangle { minimumWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2 preferredWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2 maximumWidth: Nheko.avatarSize * 10 + Nheko.paddingSmall * 2 - collapsedWidth: Nheko.avatarSize + Nheko.paddingSmall * 2 + collapsedWidth: roomlist.avatarSize + 2 * Nheko.paddingMedium RoomList { + id: roomlist + + collapsed: parent.collapsed } } @@ -52,6 +58,7 @@ Rectangle { TimelineView { id: timeline + showBackButton: adaptiveView.singlePageMode room: Rooms.currentRoom } -- cgit 1.4.1