2019-12-19 07:46:16 -04:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-07-13 05:39:01 -04:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
2019-04-28 15:18:36 -04:00
|
|
|
import "../Base"
|
2019-03-26 03:19:55 -04:00
|
|
|
|
2019-12-08 14:43:41 -04:00
|
|
|
HDrawer {
|
2019-12-10 15:17:41 -04:00
|
|
|
id: mainPane
|
2019-07-24 02:14:34 -04:00
|
|
|
|
2020-05-13 20:23:56 -04:00
|
|
|
readonly property alias accountBar: accountBar
|
2020-04-29 14:00:02 -04:00
|
|
|
readonly property alias roomList: roomList
|
2020-05-13 08:03:50 -04:00
|
|
|
readonly property alias bottomBar: bottomBar
|
2020-03-12 23:17:23 -04:00
|
|
|
|
2020-05-14 02:14:54 -04:00
|
|
|
function toggleFocus() {
|
|
|
|
if (bottomBar.filterField.activeFocus) {
|
|
|
|
pageLoader.takeFocus()
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
mainPane.open()
|
|
|
|
bottomBar.filterField.forceActiveFocus()
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-07-12 00:25:57 -04:00
|
|
|
saveName: "mainPane"
|
|
|
|
background: Rectangle { color: theme.mainPane.background }
|
2020-07-14 03:19:57 -04:00
|
|
|
minimumSize: requireDefaultSize ? defaultSize : theme.mainPane.minimumSize
|
2020-07-14 03:31:01 -04:00
|
|
|
requireDefaultSize: bottomBar.filterField.activeFocus
|
2020-07-12 00:25:57 -04:00
|
|
|
|
2019-12-16 04:42:41 -04:00
|
|
|
Behavior on opacity { HNumberAnimation {} }
|
2019-12-08 14:43:41 -04:00
|
|
|
|
2019-12-11 13:03:33 -04:00
|
|
|
Binding on visible {
|
2019-12-10 04:18:17 -04:00
|
|
|
value: false
|
|
|
|
when: ! mainUI.accountsPresent
|
|
|
|
}
|
|
|
|
|
2020-05-13 07:37:39 -04:00
|
|
|
HColumnLayout {
|
2019-03-26 03:19:55 -04:00
|
|
|
anchors.fill: parent
|
|
|
|
|
2020-05-13 07:37:39 -04:00
|
|
|
TopBar {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
2020-05-13 20:23:56 -04:00
|
|
|
AccountBar {
|
|
|
|
id: accountBar
|
2020-04-29 14:00:02 -04:00
|
|
|
roomList: roomList
|
2020-03-12 23:17:23 -04:00
|
|
|
|
2020-05-13 07:37:39 -04:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.maximumHeight: parent.height / 3
|
2020-03-12 22:16:33 -04:00
|
|
|
}
|
|
|
|
|
2020-05-13 07:37:39 -04:00
|
|
|
RoomList {
|
|
|
|
id: roomList
|
|
|
|
clip: true
|
2020-05-13 08:03:50 -04:00
|
|
|
filter: bottomBar.filterField.text
|
2019-08-18 03:27:00 -04:00
|
|
|
|
2020-05-13 07:37:39 -04:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
2020-04-29 14:00:02 -04:00
|
|
|
|
2020-05-13 08:03:50 -04:00
|
|
|
BottomBar {
|
|
|
|
id: bottomBar
|
2020-05-13 07:37:39 -04:00
|
|
|
roomList: roomList
|
2020-04-29 14:00:02 -04:00
|
|
|
|
2020-05-13 07:37:39 -04:00
|
|
|
Layout.fillWidth: true
|
2019-03-26 03:19:55 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|