Fix RoomSidePane spacing on collapse

This commit is contained in:
miruka 2019-05-17 15:46:49 -04:00
parent 2bb08874d1
commit 2e5b846695
3 changed files with 12 additions and 10 deletions

View File

@ -112,7 +112,7 @@ HColumnLayout {
)
}
collapsed: width < Layout.minimumWidth + 8
collapsed: width < HStyle.avatar.size + 8
property bool wasSnapped: false
property int referenceWidth: roomHeader.buttonsWidth

View File

@ -3,20 +3,21 @@ import QtQuick.Layouts 1.3
import "../../Base"
HColumnLayout {
property int normalSpacing: 8
property bool collapsed: false
property int normalSpacing: collapsed ? 0 : 8
Behavior on normalSpacing {
NumberAnimation { duration: HStyle.animationDuration }
}
HListView {
id: memberList
spacing: normalSpacing
topMargin: spacing
bottomMargin: topMargin
Layout.leftMargin: roomSidePane.collapsed ? 0 : normalSpacing
Layout.rightMargin: Layout.leftMargin
Behavior on spacing {
NumberAnimation { duration: HStyle.animationDuration }
}
topMargin: normalSpacing
bottomMargin: normalSpacing
Layout.leftMargin: normalSpacing
Layout.rightMargin: normalSpacing
model: chatPage.roomInfo.sortedMembers
delegate: MemberDelegate {}

View File

@ -10,5 +10,6 @@ HRectangle {
MembersView {
anchors.fill: parent
collapsed: parent.collapsed
}
}