From 6f8f96edfda27ab2bdb4d8e81919bfdda5c1ef79 Mon Sep 17 00:00:00 2001
From: lcoursodon <liam.coursodon@savoirfairelinux.com>
Date: Fri, 22 Sep 2023 14:32:26 -0400
Subject: [PATCH] Correct some bug MessageBar

Change-Id: I198763539ba1b093ef9dfbc6f429ba15dcf93285
---
 .../mainview/components/ChatViewFooter.qml    |  2 +-
 src/app/mainview/components/MessageBar.qml    | 19 +++++++++----------
 .../components/MessageBarTextArea.qml         |  2 +-
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/app/mainview/components/ChatViewFooter.qml b/src/app/mainview/components/ChatViewFooter.qml
index 549822cf9..4523d273b 100644
--- a/src/app/mainview/components/ChatViewFooter.qml
+++ b/src/app/mainview/components/ChatViewFooter.qml
@@ -130,7 +130,7 @@ Rectangle {
 
             Layout.alignment: Qt.AlignHCenter
             Layout.preferredWidth: footerColumnLayout.width
-            Layout.leftMargin: marginSize
+            Layout.leftMargin: 0
             Layout.rightMargin: marginSize
             Layout.bottomMargin: marginSize
             Layout.preferredHeight: height
diff --git a/src/app/mainview/components/MessageBar.qml b/src/app/mainview/components/MessageBar.qml
index 05759959a..7d90ef449 100644
--- a/src/app/mainview/components/MessageBar.qml
+++ b/src/app/mainview/components/MessageBar.qml
@@ -54,6 +54,7 @@ RowLayout {
     height: showTypo || multiLine ? messageBarTextArea.height + 25 + 3 * marginSize + 1 : textAreaObj.height + marginSize + 1
 
     Rectangle {
+
         Layout.preferredHeight: parent.height
         Layout.preferredWidth: childrenRect.width
         visible: !CurrentConversation.isSip
@@ -132,8 +133,6 @@ RowLayout {
 
         Layout.fillWidth: true
         Layout.fillHeight: true
-        Layout.rightMargin: marginSize
-        Layout.leftMargin: marginSize
 
         radius: 5
         color: JamiTheme.transparentColor
@@ -671,11 +670,11 @@ RowLayout {
 
                                 normalColor: {
                                     if (showPreview) {
-                                        return JamiTheme.transparentColor;
+                                        return JamiTheme.primaryBackgroundColor;
                                     } else if (modelData.isStyle) {
                                         return JamiTheme.hoveredButtonColor;
                                     } else {
-                                        return JamiTheme.transparentColor;
+                                        return JamiTheme.primaryBackgroundColor;
                                     }
                                 }
                                 imageColor: {
@@ -698,7 +697,7 @@ RowLayout {
 
                         Rectangle {
                             height: JamiTheme.chatViewFooterButtonSize
-                            color: JamiTheme.transparentColor
+                            color: JamiTheme.primaryBackgroundColor
                             visible: showTypo && showTypoSecond
                             width: 2
 
@@ -713,7 +712,7 @@ RowLayout {
                         Rectangle {
                             z: -1
                             radius: 0
-                            color: JamiTheme.transparentColor
+                            color: JamiTheme.primaryBackgroundColor
                             width: JamiTheme.chatViewFooterButtonSize
                             height: JamiTheme.chatViewFooterButtonSize
 
@@ -855,13 +854,13 @@ RowLayout {
 
                                 normalColor: {
                                     if (showPreview) {
-                                        return JamiTheme.transparentColor;
+                                        return JamiTheme.primaryBackgroundColor;
                                     } else if (modelData.normalColor != null) {
                                         return modelData.normalColor;
                                     } else if (modelData.isStyle) {
                                         return JamiTheme.hoveredButtonColor;
                                     } else {
-                                        return JamiTheme.transparentColor;
+                                        return JamiTheme.primaryBackgroundColor;
                                     }
                                 }
                                 imageColor: {
@@ -900,7 +899,7 @@ RowLayout {
                         toolTipText: showTypo ? JamiStrings.hideFormatting : JamiStrings.showFormatting
                         source: JamiResources.text_edit_black_24dp_svg
 
-                        normalColor: showPreview ? JamiTheme.transparentColor : (showTypo ? JamiTheme.hoveredButtonColor : JamiTheme.transparentColor)
+                        normalColor: showPreview ? JamiTheme.primaryBackgroundColor : (showTypo ? JamiTheme.hoveredButtonColor : JamiTheme.primaryBackgroundColor)
                         imageColor: showPreview ? JamiTheme.chatViewFooterImgDisableColor : (hovered || showTypo ? JamiTheme.chatViewFooterImgHoverColor : JamiTheme.chatViewFooterImgColor)
                         hoveredColor: JamiTheme.hoveredButtonColor
                         pressedColor: hoveredColor
@@ -1022,7 +1021,7 @@ RowLayout {
                             toolTipText: modelData.toolTip
                             source: modelData.iconSrc
 
-                            normalColor: JamiTheme.transparentColor
+                            normalColor: JamiTheme.primaryBackgroundColor
                             imageColor: showPreview ? JamiTheme.chatViewFooterImgDisableColor : (hovered ? JamiTheme.chatViewFooterImgHoverColor : JamiTheme.chatViewFooterImgColor)
                             hoveredColor: JamiTheme.hoveredButtonColor
                             pressedColor: hoveredColor
diff --git a/src/app/mainview/components/MessageBarTextArea.qml b/src/app/mainview/components/MessageBarTextArea.qml
index 3e9a786b9..d2fb2a212 100644
--- a/src/app/mainview/components/MessageBarTextArea.qml
+++ b/src/app/mainview/components/MessageBarTextArea.qml
@@ -157,7 +157,7 @@ JamiFlickable {
 
         persistentSelection: true
 
-        height: this.paintedHeight
+        height: textArea.lineCount === 1 ? 35 : textArea.paintedHeight
 
         verticalAlignment: TextEdit.AlignVCenter
 
-- 
GitLab