moment/src/gui/MainPane/MainPane.qml

64 lines
1.3 KiB
QML
Raw Normal View History

2019-12-19 07:46:16 -04:00
// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../Base"
HDrawer {
2019-12-10 15:17:41 -04:00
id: mainPane
saveName: "mainPane"
2019-12-10 15:17:41 -04:00
color: theme.mainPane.background
minimumSize: theme.controls.avatar.size + theme.spacing * 2
2019-07-16 08:36:11 -04:00
readonly property bool hasFocus: toolBar.filterField.activeFocus
readonly property alias mainPaneList: mainPaneList
readonly property alias toolBar: toolBar
property alias filter: toolBar.roomFilter
function toggleFocus() {
if (toolBar.filterField.activeFocus) {
pageLoader.takeFocus()
return
}
2019-12-10 15:17:41 -04:00
mainPane.open()
toolBar.filterField.forceActiveFocus()
}
function addccount() {
toolBar.addAccountButton.clicked()
}
2019-12-16 04:42:41 -04:00
Behavior on opacity { HNumberAnimation {} }
Binding on visible {
value: false
when: ! mainUI.accountsPresent
}
HColumnLayout {
anchors.fill: parent
AccountRoomsList {
2019-12-10 15:17:41 -04:00
id: mainPaneList
clip: true
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
}
}
}