2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
2019-04-29 05:18:36 +10:00
|
|
|
import "../Base"
|
2019-08-18 10:29:56 +10:00
|
|
|
import "../utils.js" as Utils
|
2019-03-26 18:19:55 +11:00
|
|
|
|
2019-12-09 05:43:41 +11:00
|
|
|
HDrawer {
|
2019-03-26 18:19:55 +11:00
|
|
|
id: sidePane
|
2019-12-09 05:43:41 +11:00
|
|
|
opacity: mainUI.accountsPresent ? 1 : 0
|
2019-07-24 16:14:34 +10:00
|
|
|
color: theme.sidePane.background
|
2019-12-09 05:43:41 +11:00
|
|
|
normalWidth: window.uiState.sidePaneManualWidth
|
2019-12-09 20:25:31 +11:00
|
|
|
minNormalWidth: theme.controls.avatar.size + theme.spacing * 2
|
2019-07-24 16:14:34 +10:00
|
|
|
|
2019-12-09 05:43:41 +11:00
|
|
|
onUserResized: {
|
|
|
|
window.uiState.sidePaneManualWidth = newWidth
|
2019-07-21 23:08:22 +10:00
|
|
|
window.uiStateChanged()
|
|
|
|
}
|
|
|
|
|
2019-07-16 22:36:11 +10:00
|
|
|
|
2019-12-09 05:43:41 +11:00
|
|
|
property bool hasFocus: toolBar.filterField.activeFocus
|
|
|
|
property alias sidePaneList: sidePaneList
|
|
|
|
property alias toolBar: toolBar
|
2019-08-21 03:27:13 +10:00
|
|
|
|
|
|
|
|
2019-12-09 05:43:41 +11:00
|
|
|
function toggleFocus() {
|
|
|
|
if (toolBar.filterField.activeFocus) {
|
|
|
|
pageLoader.takeFocus()
|
|
|
|
return
|
2019-09-08 06:39:14 +10:00
|
|
|
}
|
|
|
|
|
2019-12-09 05:43:41 +11:00
|
|
|
sidePane.open()
|
|
|
|
toolBar.filterField.forceActiveFocus()
|
2019-09-08 06:46:30 +10:00
|
|
|
}
|
2019-08-21 03:41:55 +10:00
|
|
|
|
|
|
|
|
2019-12-09 05:43:41 +11:00
|
|
|
Behavior on opacity { HOpacityAnimator {} }
|
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
HColumnLayout {
|
2019-03-26 18:19:55 +11:00
|
|
|
anchors.fill: parent
|
|
|
|
|
2019-08-31 01:05:11 +10:00
|
|
|
SidePaneList {
|
|
|
|
id: sidePaneList
|
2019-08-18 17:27:00 +10:00
|
|
|
clip: true
|
|
|
|
|
2019-03-26 18:19:55 +11:00
|
|
|
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
|
2019-12-09 05:43:41 +11:00
|
|
|
sidePaneList: sidePaneList
|
2019-12-09 20:25:31 +11:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: false
|
|
|
|
Layout.preferredHeight: theme.baseElementsHeight
|
|
|
|
|
2019-07-03 03:59:52 +10:00
|
|
|
}
|
2019-03-26 18:19:55 +11:00
|
|
|
}
|
|
|
|
}
|