blob: 5ccdd9f12fff26ac4cec9d1c62210330564410d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick 2.9
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.3
import "components"
import im.nheko 1.0
Rectangle {
id: chatPage
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
minimumWidth: communitiesList.avatarSize * 4 + Nheko.paddingMedium * 2
collapsedWidth: communitiesList.avatarSize + 2* Nheko.paddingMedium
preferredWidth: collapsedWidth
maximumWidth: communitiesList.avatarSize * 10 + 2* Nheko.paddingMedium
CommunitiesList {
id: communitiesList
collapsed: parent.collapsed
}
}
AdaptiveLayoutElement {
id: roomListC
minimumWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
preferredWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
maximumWidth: Nheko.avatarSize * 10 + Nheko.paddingSmall * 2
collapsedWidth: roomlist.avatarSize + 2 * Nheko.paddingMedium
RoomList {
id: roomlist
collapsed: parent.collapsed
}
}
AdaptiveLayoutElement {
id: timlineViewC
minimumWidth: 400
TimelineView {
id: timeline
showBackButton: adaptiveView.singlePageMode
room: Rooms.currentRoom
}
}
}
PrivacyScreen {
anchors.fill: parent
visible: Settings.privacyScreen
screenTimeout: Settings.privacyScreenTimeout
timelineRoot: timeline
}
}
|