moment/src/gui/MainPane/MainPane.qml

59 lines
1.2 KiB
QML
Raw Normal View History

2019-12-19 22:46:16 +11:00
// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../Base"
HDrawer {
2019-12-11 06:17:41 +11:00
id: mainPane
saveName: "mainPane"
2019-12-11 06:17:41 +11:00
color: theme.mainPane.background
minimumSize: theme.controls.avatar.size + theme.spacing * 2
2019-07-16 22:36:11 +10:00
property bool hasFocus: toolBar.filterField.activeFocus
2019-12-11 06:17:41 +11:00
property alias mainPaneList: mainPaneList
property alias toolBar: toolBar
function toggleFocus() {
if (toolBar.filterField.activeFocus) {
pageLoader.takeFocus()
return
}
2019-12-11 06:17:41 +11:00
mainPane.open()
toolBar.filterField.forceActiveFocus()
}
2019-12-16 19:42:41 +11:00
Behavior on opacity { HNumberAnimation {} }
Binding on visible {
value: false
when: ! mainUI.accountsPresent
}
HColumnLayout {
anchors.fill: parent
2019-12-11 06:17:41 +11:00
AccountRoomList {
id: mainPaneList
clip: true
Layout.fillWidth: true
Layout.fillHeight: true
}
2019-12-11 06:17:41 +11:00
MainPaneToolBar {
2019-08-31 03:48:24 +10:00
id: toolBar
2019-12-11 06:17:41 +11:00
mainPaneList: mainPaneList
2019-12-09 20:25:31 +11:00
Layout.fillWidth: true
Layout.fillHeight: false
Layout.preferredHeight: theme.baseElementsHeight
}
}
}