From c746d2786b00346f28d3a7bd83ef321691faf30a Mon Sep 17 00:00:00 2001
From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
Date: Thu, 9 Mar 2023 16:08:53 -0300
Subject: [PATCH] misc: improve chatview banners layout

Change-Id: Id357fd3fd3db1ce6fca2e1b34f192ca8f056b19c
---
 .../components/ConversationErrorsRow.qml      |  1 +
 .../mainview/components/GenericErrorsRow.qml  |  1 +
 .../mainview/components/NotificationArea.qml  | 73 +++++++++----------
 3 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/src/app/mainview/components/ConversationErrorsRow.qml b/src/app/mainview/components/ConversationErrorsRow.qml
index 44adec67d..20956e9a8 100644
--- a/src/app/mainview/components/ConversationErrorsRow.qml
+++ b/src/app/mainview/components/ConversationErrorsRow.qml
@@ -51,6 +51,7 @@ Rectangle {
 
         Text {
             id: errorLabel
+            Layout.fillWidth: true
             Layout.alignment: Qt.AlignVCenter
             text: CurrentConversation.errors.count > 0 ? CurrentConversation.errors[0][0] : ""
             color: JamiTheme.filterBadgeTextColor
diff --git a/src/app/mainview/components/GenericErrorsRow.qml b/src/app/mainview/components/GenericErrorsRow.qml
index 5e609ad5b..00260f21d 100644
--- a/src/app/mainview/components/GenericErrorsRow.qml
+++ b/src/app/mainview/components/GenericErrorsRow.qml
@@ -42,6 +42,7 @@ Rectangle {
 
         Text {
             id: errorLabel
+            Layout.fillWidth: true
             Layout.alignment: Qt.AlignVCenter
             text: CurrentAccount.enabled? JamiStrings.noNetworkConnectivity : JamiStrings.disabledAccount
             color: JamiTheme.filterBadgeTextColor
diff --git a/src/app/mainview/components/NotificationArea.qml b/src/app/mainview/components/NotificationArea.qml
index 64aa4dc10..35baf670f 100644
--- a/src/app/mainview/components/NotificationArea.qml
+++ b/src/app/mainview/components/NotificationArea.qml
@@ -46,6 +46,7 @@ Rectangle {
 
         Text {
             id: errorLabel
+            Layout.fillWidth: true
             Layout.alignment: Qt.AlignVCenter
             Layout.margins: 0
             text: JamiStrings.wantToJoin
@@ -54,57 +55,51 @@ Rectangle {
             elide: Text.ElideRight
         }
 
-        RowLayout {
-            id: controls
+        PushButton {
+            id: joinCallInAudio
             Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
+            Layout.rightMargin: JamiTheme.preferredMarginSize
 
-            PushButton {
-                id: joinCallInAudio
-                Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
-                Layout.rightMargin: JamiTheme.preferredMarginSize
+            source: JamiResources.place_audiocall_24dp_svg
+            toolTipText: JamiStrings.joinCall
 
-                source: JamiResources.place_audiocall_24dp_svg
-                toolTipText: JamiStrings.joinCall
-
-                imageColor: root.textColor
-                normalColor: "transparent"
-                hoveredColor: Qt.rgba(255, 255, 255, 0.2)
-                border.width: 1
-                border.color: root.textColor
-
-                onClicked: MessagesAdapter.joinCall(uri, device, id, true)
-            }
+            imageColor: root.textColor
+            normalColor: "transparent"
+            hoveredColor: Qt.rgba(255, 255, 255, 0.2)
+            border.width: 1
+            border.color: root.textColor
 
+            onClicked: MessagesAdapter.joinCall(uri, device, id, true)
+        }
 
-            PushButton {
-                id: joinCallInVideo
-                Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
-                Layout.rightMargin: JamiTheme.preferredMarginSize
+        PushButton {
+            id: joinCallInVideo
+            Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
+            Layout.rightMargin: JamiTheme.preferredMarginSize
 
-                source: JamiResources.videocam_24dp_svg
-                toolTipText: JamiStrings.joinCall
+            source: JamiResources.videocam_24dp_svg
+            toolTipText: JamiStrings.joinCall
 
-                imageColor: root.textColor
-                normalColor: "transparent"
-                hoveredColor: Qt.rgba(255, 255, 255, 0.2)
-                border.width: 1
-                border.color: root.textColor
-                visible: CurrentAccount.videoEnabled_Video
+            imageColor: root.textColor
+            normalColor: "transparent"
+            hoveredColor: Qt.rgba(255, 255, 255, 0.2)
+            border.width: 1
+            border.color: root.textColor
+            visible: CurrentAccount.videoEnabled_Video
 
-                onClicked: MessagesAdapter.joinCall(uri, device, id)
-            }
+            onClicked: MessagesAdapter.joinCall(uri, device, id)
+        }
 
-            PushButton {
-                id: btnClose
-                Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
+        PushButton {
+            id: btnClose
+            Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
 
-                imageColor: root.textColor
-                normalColor: JamiTheme.transparentColor
+            imageColor: root.textColor
+            normalColor: JamiTheme.transparentColor
 
-                source: JamiResources.round_close_24dp_svg
+            source: JamiResources.round_close_24dp_svg
 
-                onClicked: ConversationsAdapter.ignoreActiveCall(CurrentConversation.id, id, uri, device)
-            }
+            onClicked: ConversationsAdapter.ignoreActiveCall(CurrentConversation.id, id, uri, device)
         }
     }
 
-- 
GitLab