summary refs log tree commit diff
path: root/resources/qml/ChatPage.qml
blob: 966f169b307abde4dfe79347847f4ac98c97963c (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
// 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 im.nheko 1.0

Rectangle {
    id: chatPage

    color: Nheko.colors.window

    SplitView {
        anchors.fill: parent

        Rectangle {
            SplitView.minimumWidth: Nheko.avatarSize + Nheko.paddingSmall * 2
            SplitView.preferredWidth: Nheko.avatarSize + Nheko.paddingSmall * 2
            SplitView.maximumWidth: Nheko.avatarSize + Nheko.paddingSmall * 2
            color: Nheko.theme.sidebarBackground
        }

        RoomList {
            //SplitView.maximumWidth: Nheko.avatarSize * 7 + Nheko.paddingSmall * 2

            SplitView.minimumWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
            SplitView.preferredWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
        }

        TimelineView {
            id: timeline
            room: Rooms.currentRoom

            SplitView.fillWidth: true
            SplitView.minimumWidth: 400
        }

        handle: Rectangle {
            implicitWidth: 2
            color: SplitHandle.pressed ? Nheko.colors.highlight : (SplitHandle.hovered ? Nheko.colors.light : Nheko.theme.separator)
        }

    }

    PrivacyScreen {
        anchors.fill: parent
        visible: Settings.privacyScreen
        screenTimeout: Settings.privacyScreenTimeout
        timelineRoot: timeline
    }

}