fix(ChatHeaderContentView): Unreachable buttons in community header at min width

Closes: #7647
This commit is contained in:
Michał Cieślak 2022-10-06 11:58:58 +02:00 committed by Michał
parent cb7e67ce8c
commit 553f1f5beb
1 changed files with 20 additions and 9 deletions

View File

@ -12,9 +12,8 @@ import utils 1.0
import "../panels"
import "../stores"
RowLayout {
Item {
id: root
spacing: padding / 2
property alias menuButton: menuButton
property alias membersButton: membersButton
@ -44,17 +43,29 @@ RowLayout {
Loader {
id: loader
Layout.fillWidth: d.selectingMembers
Layout.fillHeight: true
sourceComponent: {
if (d.selectingMembers) return membersSelector
return statusChatInfoButton
}
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: d.selectingMembers ? parent.right : undefined
sourceComponent: d.selectingMembers ? membersSelector : statusChatInfoButton
}
Rectangle {
anchors.fill: actionButtons
visible: actionButtons.visible
opacity: 0.8
color: Style.current.background
}
RowLayout {
id: actionButtons
Layout.alignment: Qt.AlignRight
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
spacing: 8
visible: !d.selectingMembers