fix(demo/CreateChatView): fixed layout issues (#783)

As part of https://github.com/status-im/status-desktop/issues/6452
This commit is contained in:
Alexandra Betouni 2022-07-15 19:35:59 +03:00 committed by Michał Cieślak
parent e848ee3ba7
commit 57d750e514

View File

@ -20,6 +20,7 @@ Page {
height: tagSelector.height height: tagSelector.height
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 8 anchors.rightMargin: 8
spacing: 16
StatusTagSelector { StatusTagSelector {
id: tagSelector id: tagSelector
@ -73,26 +74,43 @@ Page {
} }
StatusButton { StatusButton {
implicitWidth: 106
implicitHeight: 44 implicitHeight: 44
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
enabled: (tagSelector.namesModel.count > 0) enabled: (tagSelector.namesModel.count > 0)
text: "Confirm" text: "Confirm"
} }
Item {
implicitHeight: 32
implicitWidth: 32
Layout.alignment: Qt.AlignTop
StatusActivityCenterButton {
id: notificationButton
anchors.right: parent.right
unreadNotificationsCount: 3
}
}
} }
contentItem: Item { contentItem: Item {
anchors.fill: parent anchors.fill: parent
StatusBaseText { StatusBaseText {
visible: (contactsModel.count === 0) anchors.left: parent.left
anchors.centerIn: parent anchors.leftMargin: 252
anchors.right: parent.right
anchors.rightMargin: 252
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -(headerRow.height/2)
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
font.pixelSize: 15 visible: contactsModel.count === 0
wrapMode: Text.WordWrap
color: Theme.palette.baseColor1 color: Theme.palette.baseColor1
text: qsTr("You can only send direct messages to your Contacts. \n\n text: qsTr("You can only send direct messages to your Contacts.\n
Send a contact request to the person you would like to chat with, you will be\n able to Send a contact request to the person you would like to chat with, you will be able to chat with them once they have accepted your contact request.")
chat with them once they have accepted your contact request.")
Component.onCompleted: { Component.onCompleted: {
if (visible) { if (visible) {
tagSelector.enabled = false; tagSelector.enabled = false;