Work in progress keybard sidepane navigation

This commit is contained in:
miruka
2019-08-17 20:29:56 -04:00
parent 4e14828004
commit 3cc39210b4
6 changed files with 98 additions and 10 deletions

View File

@@ -11,10 +11,16 @@ Column {
paneToolBar.roomFilter && roomList.model.count < 1 ? 0.3 : 1
Behavior on opacity { HNumberAnimation {} }
property alias roomList: roomList
property bool forceExpand: paneToolBar.roomFilter && roomList.model.count
property bool expanded: true
readonly property var modelItem: model
readonly property bool isCurrent:
window.uiState.page == "Pages/EditAccount/EditAccount.qml" &&
window.uiState.pageProperties.userId == model.user_id
Component.onCompleted:
expanded = ! window.uiState.collapseAccounts[model.user_id]
@@ -23,20 +29,21 @@ Column {
window.uiStateChanged()
}
function activate() {
pageStack.showPage(
"EditAccount/EditAccount", { "userId": model.user_id }
)
}
HInteractiveRectangle {
id: rectangle
width: parent.width
height: childrenRect.height
color: theme.sidePane.account.background
checked:
window.uiState.page == "Pages/EditAccount/EditAccount.qml" &&
window.uiState.pageProperties.userId == model.user_id
checked: accountDelegate.isCurrent
TapHandler {
onTapped: pageStack.showPage(
"EditAccount/EditAccount", { "userId": model.user_id }
)
}
TapHandler { onTapped: accountDelegate.activate() }
HRowLayout {
id: row