moment/src/qml/SidePane/SidePane.qml

65 lines
1.4 KiB
QML
Raw Normal View History

import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../Base"
import "../utils.js" as Utils
HDrawer {
id: sidePane
color: theme.sidePane.background
normalSize: window.uiState.sidePaneManualWidth
minNormalSize: theme.controls.avatar.size + theme.spacing * 2
onUserResized: {
window.uiState.sidePaneManualWidth = newWidth
2019-07-21 23:08:22 +10:00
window.uiStateChanged()
}
2019-07-16 22:36:11 +10:00
property bool hasFocus: toolBar.filterField.activeFocus
property alias sidePaneList: sidePaneList
property alias toolBar: toolBar
function toggleFocus() {
if (toolBar.filterField.activeFocus) {
pageLoader.takeFocus()
return
}
sidePane.open()
toolBar.filterField.forceActiveFocus()
}
Behavior on opacity { HOpacityAnimator {} }
Binding {
target: sidePane
property: "visible"
value: false
when: ! mainUI.accountsPresent
}
HColumnLayout {
anchors.fill: parent
2019-08-31 01:05:11 +10:00
SidePaneList {
id: sidePaneList
clip: true
Layout.fillWidth: true
Layout.fillHeight: true
}
2019-08-31 01:05:11 +10:00
SidePaneToolBar {
2019-08-31 03:48:24 +10:00
id: toolBar
sidePaneList: sidePaneList
2019-12-09 20:25:31 +11:00
Layout.fillWidth: true
Layout.fillHeight: false
Layout.preferredHeight: theme.baseElementsHeight
}
}
}