Skip to content
Snippets Groups Projects
Commit 10e4b634 authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

callview: set minimumwidth for splited chatview

GitLab: #1000
GitLab: #974

Change-Id: I5f14dc9447bf88d1addebfccd07dc84c632af426
parent 05c52e89
No related branches found
No related tags found
No related merge requests found
...@@ -352,6 +352,7 @@ Item { ...@@ -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")
......
...@@ -78,6 +78,8 @@ BaseView { ...@@ -78,6 +78,8 @@ BaseView {
if (!CurrentConversation.hasCall) { if (!CurrentConversation.hasCall) {
resetPanels() resetPanels()
Qt.callLater(focusChatView) Qt.callLater(focusChatView)
} else {
dismiss()
} }
} }
......
...@@ -81,10 +81,8 @@ Rectangle { ...@@ -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 { ...@@ -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 { ...@@ -258,8 +247,6 @@ Rectangle {
onClicked: showDetailsClicked() onClicked: showDetailsClicked()
} }
} }
}
} }
CustomBorder { CustomBorder {
......
...@@ -117,6 +117,14 @@ Rectangle { ...@@ -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 { ...@@ -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 { ...@@ -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
}
}
} }
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment