Rewrite SidePane using QQC Drawer

Cleaner approach, gets rid of the HPage swipe view hack, better
performances, a lot less complex
This commit is contained in:
miruka
2019-12-08 14:43:41 -04:00
parent 5326726c4f
commit 06a6a4c08d
13 changed files with 250 additions and 260 deletions

View File

@@ -6,7 +6,7 @@ import "../utils.js" as Utils
HTileDelegate {
id: accountDelegate
spacing: 0
topPadding: model.index > 0 ? sidePane.currentSpacing / 2 : 0
topPadding: model.index > 0 ? theme.spacing / 2 : 0
bottomPadding: topPadding
backgroundColor: theme.sidePane.account.background
opacity: collapsed && ! forceExpand ?
@@ -54,7 +54,7 @@ HTileDelegate {
title.color: theme.sidePane.account.name
title.text: model.data.display_name || model.data.user_id
title.font.pixelSize: theme.fontSize.big
title.leftPadding: sidePane.currentSpacing
title.leftPadding: theme.spacing
HButton {
id: addChat
@@ -112,7 +112,7 @@ HTileDelegate {
text: qsTr("Sign out")
onTriggered: Utils.makePopup(
"Popups/SignOutPopup.qml",
mainUI,
window,
{ "userId": model.data.user_id },
popup => { popup.ok.connect(() => { disconnecting = true }) },
)