1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-26 18:35:34 +02:00

callview: set minimumwidth for splited chatview

GitLab: #1000
GitLab: #974

Change-Id: I5f14dc9447bf88d1addebfccd07dc84c632af426
This commit is contained in:
Aline Gondim Santos 2023-02-24 14:19:36 -03:00
parent 05c52e89fa
commit 10e4b63414
4 changed files with 105 additions and 100 deletions

View file

@ -352,6 +352,7 @@ Item {
property string disabledAccount: qsTr("The account is disabled") property string disabledAccount: qsTr("The account is disabled")
property string noNetworkConnectivity: qsTr("No network connectivity") property string noNetworkConnectivity: qsTr("No network connectivity")
property string deletedMessage: qsTr("Deleted message") property string deletedMessage: qsTr("Deleted message")
property string backCall: qsTr("Back to Call")
//MessagesResearch //MessagesResearch
property string jumpTo: qsTr("Jump to") property string jumpTo: qsTr("Jump to")

View file

@ -78,6 +78,8 @@ BaseView {
if (!CurrentConversation.hasCall) { if (!CurrentConversation.hasCall) {
resetPanels() resetPanels()
Qt.callLater(focusChatView) Qt.callLater(focusChatView)
} else {
dismiss()
} }
} }

View file

@ -81,10 +81,8 @@ Rectangle {
preferredSize: 24 preferredSize: 24
source: CurrentConversation.inCall ? source: JamiResources.back_24dp_svg
JamiResources.round_close_24dp_svg : toolTipText: CurrentConversation.inCall ? JamiStrings.backCall : JamiStrings.hideChat
JamiResources.back_24dp_svg
toolTipText: JamiStrings.hideChat
normalColor: JamiTheme.chatviewBgColor normalColor: JamiTheme.chatviewBgColor
imageColor: JamiTheme.chatviewButtonColor imageColor: JamiTheme.chatviewButtonColor
@ -146,30 +144,21 @@ Rectangle {
} }
RowLayout { RowLayout {
id: buttonGroup id: headerButtons
property int buttonGroupMargin: 8
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: buttonGroupMargin Layout.rightMargin: 8
spacing: 16 spacing: 16
Layout.fillWidth: true Layout.fillWidth: true
Searchbar { Searchbar {
id: rowSearchBar id: rowSearchBar
spacing: buttonGroup.spacing Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
spacing: headerButtons.spacing
visible: CurrentConversation.isSwarm visible: CurrentConversation.isSwarm
} }
RowLayout {
id: pushbuttons
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: 8
spacing: 16
Layout.fillWidth: true
PushButton { PushButton {
id: startAAudioCallButton id: startAAudioCallButton
@ -258,8 +247,6 @@ Rectangle {
onClicked: showDetailsClicked() onClicked: showDetailsClicked()
} }
} }
}
} }
CustomBorder { CustomBorder {

View file

@ -117,6 +117,14 @@ Rectangle {
previewRenderer.state = "geoChanging" previewRenderer.state = "geoChanging"
} }
onWidthChanged: {
if (chatViewContainer.visible && root.width < JamiTheme.chatViewHeaderMinimumWidth * 2) {
callPageMainRect.visible = false
} else {
callPageMainRect.visible = true
}
}
SplitView { SplitView {
id: mainColumnLayout id: mainColumnLayout
@ -137,10 +145,8 @@ Rectangle {
id: callPageMainRect id: callPageMainRect
SplitView.preferredHeight: mainColumnLayout.isHorizontal ? root.height : (root.height / 3) * 2 SplitView.preferredHeight: mainColumnLayout.isHorizontal ? root.height : (root.height / 3) * 2
SplitView.preferredWidth: mainColumnLayout.isHorizontal ? (root.width / 3) * 2 : root.width SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth
SplitView.minimumHeight: root.height / 2 + 20 SplitView.fillWidth: true
SplitView.minimumWidth: root.width / 2 + 20
SplitView.fillWidth: !mainColumnLayout.isHorizontal
TapHandler { TapHandler {
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
@ -388,10 +394,19 @@ Rectangle {
root.height : root.height :
root.height / 3 root.height / 3
SplitView.preferredWidth: mainColumnLayout.isHorizontal ? SplitView.preferredWidth: mainColumnLayout.isHorizontal ?
root.width / 3 : JamiTheme.chatViewHeaderMinimumWidth :
root.width root.width
SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth
visible: false visible: false
clip: true clip: true
onVisibleChanged: {
if (visible && root.width < JamiTheme.chatViewHeaderMinimumWidth * 2) {
callPageMainRect.visible = false
} else {
callPageMainRect.visible = true
}
}
} }
} }
} }