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 bool wasSnapped: false
property int referenceWidth: roomHeader.buttonsWidth property int referenceWidth: roomHeader.buttonsWidth

View File

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

View File

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