diff --git a/qml.qrc b/qml.qrc
index 91803d64..8597566e 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -95,7 +95,7 @@
src/mainview/components/SidePanel.qml
src/mainview/components/WelcomePage.qml
src/mainview/components/ChatView.qml
- src/mainview/components/MessageWebViewHeader.qml
+ src/mainview/components/ChatViewHeader.qml
src/mainview/components/AccountComboBox.qml
src/mainview/components/CallStackView.qml
src/mainview/components/InitialCallPage.qml
diff --git a/src/constant/JamiTheme.qml b/src/constant/JamiTheme.qml
index 4f0c93ef..a1611449 100644
--- a/src/constant/JamiTheme.qml
+++ b/src/constant/JamiTheme.qml
@@ -272,8 +272,8 @@ Item {
// MessageWebView
property real chatViewHairLineSize: 1
- property real messageWebViewHeaderPreferredHeight: 64
property real chatViewMaximumWidth: 900
+ property real chatViewHeaderPreferredHeight: 64
property real chatViewFooterPreferredHeight: 50
property real chatViewFooterMaximumHeight: 280
property real chatViewFooterRowSpacing: 1
diff --git a/src/mainview/components/ChatView.qml b/src/mainview/components/ChatView.qml
index 1336f143..fe8be3a1 100644
--- a/src/mainview/components/ChatView.qml
+++ b/src/mainview/components/ChatView.qml
@@ -52,13 +52,13 @@ Rectangle {
spacing: 0
- MessageWebViewHeader {
+ ChatViewHeader {
id: messageWebViewHeader
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
- Layout.preferredHeight: JamiTheme.messageWebViewHeaderPreferredHeight
- Layout.maximumHeight: JamiTheme.messageWebViewHeaderPreferredHeight
+ Layout.preferredHeight: JamiTheme.chatViewHeaderPreferredHeight
+ Layout.maximumHeight: JamiTheme.chatViewHeaderPreferredHeight
userAliasLabelText: headerUserAliasLabelText
userUserNameLabelText: headerUserUserNameLabelText
diff --git a/src/mainview/components/MessageWebViewHeader.qml b/src/mainview/components/ChatViewHeader.qml
similarity index 82%
rename from src/mainview/components/MessageWebViewHeader.qml
rename to src/mainview/components/ChatViewHeader.qml
index de14a33f..f2ce5da9 100644
--- a/src/mainview/components/MessageWebViewHeader.qml
+++ b/src/mainview/components/ChatViewHeader.qml
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang
+ * Author: Sébastien Blin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -82,9 +83,8 @@ Rectangle {
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
// Width + margin.
- Layout.preferredWidth: root.width
- - backToWelcomeViewButton.width - buttonGroup.width - 45
Layout.fillHeight: true
+ Layout.fillWidth: true
Layout.topMargin: 7
Layout.bottomMargin: 7
Layout.leftMargin: 8
@@ -130,12 +130,11 @@ Rectangle {
}
}
- Item {
+ RowLayout {
id: buttonGroup
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
- Layout.preferredWidth: childrenRect.width + 18
- Layout.preferredHeight: childrenRect.height
+ Layout.fillWidth: true
Layout.rightMargin: 8
PushButton {
@@ -143,10 +142,6 @@ Rectangle {
visible: interactionButtonsVisibility
- anchors.right: startAVideoCallButton.left
- anchors.rightMargin: 8
- anchors.verticalCenter: buttonGroup.verticalCenter
-
source: JamiResources.place_audiocall_24dp_svg
toolTipText: JamiStrings.placeAudioCall
@@ -161,13 +156,6 @@ Rectangle {
visible: interactionButtonsVisibility
- anchors.right: selectPluginButton.visible ? selectPluginButton.left :
- sendContactRequestButton.visible ?
- sendContactRequestButton.left :
- buttonGroup.right
- anchors.rightMargin: 8
- anchors.verticalCenter: buttonGroup.verticalCenter
-
source: JamiResources.videocam_24dp_svg
toolTipText: JamiStrings.placeVideoCall
@@ -183,12 +171,6 @@ Rectangle {
visible: PluginAdapter.chatHandlersListCount &&
interactionButtonsVisibility
- anchors.right: sendContactRequestButton.visible ?
- sendContactRequestButton.left :
- buttonGroup.right
- anchors.rightMargin: sendContactRequestButton.visible ? 8 : 16
- anchors.verticalCenter: buttonGroup.verticalCenter
-
source: JamiResources.plugins_24dp_svg
toolTipText: JamiStrings.showPlugins
@@ -203,10 +185,6 @@ Rectangle {
visible: CurrentConversation.isTemporary
- anchors.right: buttonGroup.right
- anchors.rightMargin: 8
- anchors.verticalCenter: buttonGroup.verticalCenter
-
source: JamiResources.add_people_24dp_svg
toolTipText: JamiStrings.addToConversations