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 {
property string disabledAccount: qsTr("The account is disabled")
property string noNetworkConnectivity: qsTr("No network connectivity")
property string deletedMessage: qsTr("Deleted message")
property string backCall: qsTr("Back to Call")
//MessagesResearch
property string jumpTo: qsTr("Jump to")
......
......@@ -78,6 +78,8 @@ BaseView {
if (!CurrentConversation.hasCall) {
resetPanels()
Qt.callLater(focusChatView)
} else {
dismiss()
}
}
......
......@@ -81,10 +81,8 @@ Rectangle {
preferredSize: 24
source: CurrentConversation.inCall ?
JamiResources.round_close_24dp_svg :
JamiResources.back_24dp_svg
toolTipText: JamiStrings.hideChat
source: JamiResources.back_24dp_svg
toolTipText: CurrentConversation.inCall ? JamiStrings.backCall : JamiStrings.hideChat
normalColor: JamiTheme.chatviewBgColor
imageColor: JamiTheme.chatviewButtonColor
......@@ -146,30 +144,21 @@ Rectangle {
}
RowLayout {
id: buttonGroup
property int buttonGroupMargin: 8
id: headerButtons
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: buttonGroupMargin
Layout.rightMargin: 8
spacing: 16
Layout.fillWidth: true
Searchbar {
id: rowSearchBar
spacing: buttonGroup.spacing
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
spacing: headerButtons.spacing
visible: CurrentConversation.isSwarm
}
RowLayout {
id: pushbuttons
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: 8
spacing: 16
Layout.fillWidth: true
PushButton {
id: startAAudioCallButton
......@@ -258,8 +247,6 @@ Rectangle {
onClicked: showDetailsClicked()
}
}
}
}
CustomBorder {
......
......@@ -117,6 +117,14 @@ Rectangle {
previewRenderer.state = "geoChanging"
}
onWidthChanged: {
if (chatViewContainer.visible && root.width < JamiTheme.chatViewHeaderMinimumWidth * 2) {
callPageMainRect.visible = false
} else {
callPageMainRect.visible = true
}
}
SplitView {
id: mainColumnLayout
......@@ -137,10 +145,8 @@ Rectangle {
id: callPageMainRect
SplitView.preferredHeight: mainColumnLayout.isHorizontal ? root.height : (root.height / 3) * 2
SplitView.preferredWidth: mainColumnLayout.isHorizontal ? (root.width / 3) * 2 : root.width
SplitView.minimumHeight: root.height / 2 + 20
SplitView.minimumWidth: root.width / 2 + 20
SplitView.fillWidth: !mainColumnLayout.isHorizontal
SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth
SplitView.fillWidth: true
TapHandler {
acceptedButtons: Qt.LeftButton | Qt.RightButton
......@@ -388,10 +394,19 @@ Rectangle {
root.height :
root.height / 3
SplitView.preferredWidth: mainColumnLayout.isHorizontal ?
root.width / 3 :
JamiTheme.chatViewHeaderMinimumWidth :
root.width
SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth
visible: false
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