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-12-10 16:29:49 -04:00
|
|
|
saveName: "mainPane"
|
2019-12-10 15:17:41 -04:00
|
|
|
color: theme.mainPane.background
|
2019-12-10 14:19:25 -04:00
|
|
|
minimumSize: theme.controls.avatar.size + theme.spacing * 2
|
2019-07-24 02:14:34 -04:00
|
|
|
|
2019-07-16 08:36:11 -04:00
|
|
|
|
2020-02-03 16:19:42 -04:00
|
|
|
readonly property bool hasFocus: toolBar.filterField.activeFocus
|
|
|
|
readonly property alias mainPaneList: mainPaneList
|
|
|
|
readonly property alias toolBar: toolBar
|
|
|
|
property alias filter: toolBar.roomFilter
|
2019-08-20 13:27:13 -04:00
|
|
|
|
|
|
|
|
2019-12-08 14:43:41 -04:00
|
|
|
function toggleFocus() {
|
|
|
|
if (toolBar.filterField.activeFocus) {
|
|
|
|
pageLoader.takeFocus()
|
|
|
|
return
|
2019-09-07 16:39:14 -04:00
|
|
|
}
|
|
|
|
|
2019-12-10 15:17:41 -04:00
|
|
|
mainPane.open()
|
2019-12-08 14:43:41 -04:00
|
|
|
toolBar.filterField.forceActiveFocus()
|
2019-09-07 16:46:30 -04:00
|
|
|
}
|
2019-08-20 13:41:55 -04:00
|
|
|
|
2020-02-13 05:56:10 -04:00
|
|
|
function addccount() {
|
|
|
|
toolBar.addAccountButton.clicked()
|
|
|
|
}
|
|
|
|
|
2019-08-20 13:41:55 -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
|
|
|
|
}
|
|
|
|
|
2019-04-28 15:18:36 -04:00
|
|
|
HColumnLayout {
|
2019-03-26 03:19:55 -04:00
|
|
|
anchors.fill: parent
|
|
|
|
|
2019-12-02 16:29:29 -04:00
|
|
|
AccountRoomsList {
|
2019-12-10 15:17:41 -04:00
|
|
|
id: mainPaneList
|
2019-08-18 03:27:00 -04:00
|
|
|
clip: true
|
|
|
|
|
2019-03-26 03:19:55 -04:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
|
2019-12-10 15:17:41 -04:00
|
|
|
MainPaneToolBar {
|
2019-08-30 13:48:24 -04:00
|
|
|
id: toolBar
|
2019-12-10 15:17:41 -04:00
|
|
|
mainPaneList: mainPaneList
|
2019-12-09 05:25:31 -04:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: false
|
|
|
|
Layout.preferredHeight: theme.baseElementsHeight
|
|
|
|
|
2019-07-02 13:59:52 -04:00
|
|
|
}
|
2019-03-26 03:19:55 -04:00
|
|
|
}
|
|
|
|
}
|