mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-21 23:33:58 +02:00
messagewebviewheader: clean code
+ Change name to ChatviewHeader as no webview + Avoid anchors hell and use a RowLayout Change-Id: Iff4bbeabc70cfa496a7a208ee5da0c9ea1b6ff08
This commit is contained in:
parent
2e67dc1bd8
commit
fe9745ce23
4 changed files with 9 additions and 31 deletions
2
qml.qrc
2
qml.qrc
|
@ -95,7 +95,7 @@
|
|||
<file>src/mainview/components/SidePanel.qml</file>
|
||||
<file>src/mainview/components/WelcomePage.qml</file>
|
||||
<file>src/mainview/components/ChatView.qml</file>
|
||||
<file>src/mainview/components/MessageWebViewHeader.qml</file>
|
||||
<file>src/mainview/components/ChatViewHeader.qml</file>
|
||||
<file>src/mainview/components/AccountComboBox.qml</file>
|
||||
<file>src/mainview/components/CallStackView.qml</file>
|
||||
<file>src/mainview/components/InitialCallPage.qml</file>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 2020 by Savoir-faire Linux
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
|
||||
*
|
||||
* 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
|
||||
|
Loading…
Add table
Reference in a new issue