mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-26 02:15:33 +02:00
callview: set minimumwidth for splited chatview
GitLab: #1000 GitLab: #974 Change-Id: I5f14dc9447bf88d1addebfccd07dc84c632af426
This commit is contained in:
parent
05c52e89fa
commit
10e4b63414
4 changed files with 105 additions and 100 deletions
|
@ -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 {
|
||||||
if (!CurrentConversation.hasCall) {
|
if (!CurrentConversation.hasCall) {
|
||||||
resetPanels()
|
resetPanels()
|
||||||
Qt.callLater(focusChatView)
|
Qt.callLater(focusChatView)
|
||||||
|
} else {
|
||||||
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,119 +144,108 @@ 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 {
|
PushButton {
|
||||||
id: pushbuttons
|
id: startAAudioCallButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
visible: interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
||||||
Layout.rightMargin: 8
|
|
||||||
spacing: 16
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
PushButton {
|
source: JamiResources.place_audiocall_24dp_svg
|
||||||
id: startAAudioCallButton
|
toolTipText: JamiStrings.placeAudioCall
|
||||||
|
|
||||||
visible: interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
normalColor: JamiTheme.chatviewBgColor
|
||||||
|
imageColor: JamiTheme.chatviewButtonColor
|
||||||
|
|
||||||
source: JamiResources.place_audiocall_24dp_svg
|
onClicked: CallAdapter.placeAudioOnlyCall()
|
||||||
toolTipText: JamiStrings.placeAudioCall
|
}
|
||||||
|
|
||||||
normalColor: JamiTheme.chatviewBgColor
|
PushButton {
|
||||||
imageColor: JamiTheme.chatviewButtonColor
|
id: startAVideoCallButton
|
||||||
|
|
||||||
onClicked: CallAdapter.placeAudioOnlyCall()
|
visible: CurrentAccount.videoEnabled_Video && interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
||||||
}
|
source: JamiResources.videocam_24dp_svg
|
||||||
|
toolTipText: JamiStrings.placeVideoCall
|
||||||
|
|
||||||
PushButton {
|
normalColor: JamiTheme.chatviewBgColor
|
||||||
id: startAVideoCallButton
|
imageColor: JamiTheme.chatviewButtonColor
|
||||||
|
|
||||||
visible: CurrentAccount.videoEnabled_Video && interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
onClicked: {
|
||||||
source: JamiResources.videocam_24dp_svg
|
CallAdapter.placeCall()
|
||||||
toolTipText: JamiStrings.placeVideoCall
|
|
||||||
|
|
||||||
normalColor: JamiTheme.chatviewBgColor
|
|
||||||
imageColor: JamiTheme.chatviewButtonColor
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
CallAdapter.placeCall()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PushButton {
|
|
||||||
id: addParticipantsButton
|
|
||||||
|
|
||||||
source: JamiResources.add_people_24dp_svg
|
|
||||||
toolTipText: JamiStrings.addParticipants
|
|
||||||
|
|
||||||
normalColor: JamiTheme.chatviewBgColor
|
|
||||||
imageColor: JamiTheme.chatviewButtonColor
|
|
||||||
|
|
||||||
visible: CurrentConversationMembers.count < 8 && addMemberVisibility
|
|
||||||
|
|
||||||
onClicked: addToConversationClicked()
|
|
||||||
}
|
|
||||||
|
|
||||||
PushButton {
|
|
||||||
id: selectPluginButton
|
|
||||||
|
|
||||||
visible: PluginAdapter.isEnabled && PluginAdapter.chatHandlersListCount &&
|
|
||||||
interactionButtonsVisibility
|
|
||||||
|
|
||||||
source: JamiResources.plugins_24dp_svg
|
|
||||||
toolTipText: JamiStrings.showPlugins
|
|
||||||
|
|
||||||
normalColor: JamiTheme.chatviewBgColor
|
|
||||||
imageColor: JamiTheme.chatviewButtonColor
|
|
||||||
|
|
||||||
onClicked: pluginSelector()
|
|
||||||
}
|
|
||||||
|
|
||||||
PushButton {
|
|
||||||
id: sendContactRequestButton
|
|
||||||
|
|
||||||
visible: CurrentConversation.isTemporary || CurrentConversation.isBanned
|
|
||||||
|
|
||||||
source: JamiResources.add_people_24dp_svg
|
|
||||||
toolTipText: JamiStrings.addToConversations
|
|
||||||
|
|
||||||
normalColor: JamiTheme.chatviewBgColor
|
|
||||||
imageColor: JamiTheme.chatviewButtonColor
|
|
||||||
|
|
||||||
onClicked: CurrentConversation.isBanned ?
|
|
||||||
MessagesAdapter.unbanConversation(CurrentConversation.id)
|
|
||||||
: MessagesAdapter.sendConversationRequest()
|
|
||||||
}
|
|
||||||
|
|
||||||
PushButton {
|
|
||||||
id: detailsButton
|
|
||||||
|
|
||||||
visible: swarmDetailsVisibility
|
|
||||||
|
|
||||||
source: JamiResources.swarm_details_panel_svg
|
|
||||||
toolTipText: JamiStrings.details
|
|
||||||
|
|
||||||
normalColor: JamiTheme.chatviewBgColor
|
|
||||||
imageColor: JamiTheme.chatviewButtonColor
|
|
||||||
|
|
||||||
onClicked: showDetailsClicked()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PushButton {
|
||||||
|
id: addParticipantsButton
|
||||||
|
|
||||||
|
source: JamiResources.add_people_24dp_svg
|
||||||
|
toolTipText: JamiStrings.addParticipants
|
||||||
|
|
||||||
|
normalColor: JamiTheme.chatviewBgColor
|
||||||
|
imageColor: JamiTheme.chatviewButtonColor
|
||||||
|
|
||||||
|
visible: CurrentConversationMembers.count < 8 && addMemberVisibility
|
||||||
|
|
||||||
|
onClicked: addToConversationClicked()
|
||||||
|
}
|
||||||
|
|
||||||
|
PushButton {
|
||||||
|
id: selectPluginButton
|
||||||
|
|
||||||
|
visible: PluginAdapter.isEnabled && PluginAdapter.chatHandlersListCount &&
|
||||||
|
interactionButtonsVisibility
|
||||||
|
|
||||||
|
source: JamiResources.plugins_24dp_svg
|
||||||
|
toolTipText: JamiStrings.showPlugins
|
||||||
|
|
||||||
|
normalColor: JamiTheme.chatviewBgColor
|
||||||
|
imageColor: JamiTheme.chatviewButtonColor
|
||||||
|
|
||||||
|
onClicked: pluginSelector()
|
||||||
|
}
|
||||||
|
|
||||||
|
PushButton {
|
||||||
|
id: sendContactRequestButton
|
||||||
|
|
||||||
|
visible: CurrentConversation.isTemporary || CurrentConversation.isBanned
|
||||||
|
|
||||||
|
source: JamiResources.add_people_24dp_svg
|
||||||
|
toolTipText: JamiStrings.addToConversations
|
||||||
|
|
||||||
|
normalColor: JamiTheme.chatviewBgColor
|
||||||
|
imageColor: JamiTheme.chatviewButtonColor
|
||||||
|
|
||||||
|
onClicked: CurrentConversation.isBanned ?
|
||||||
|
MessagesAdapter.unbanConversation(CurrentConversation.id)
|
||||||
|
: MessagesAdapter.sendConversationRequest()
|
||||||
|
}
|
||||||
|
|
||||||
|
PushButton {
|
||||||
|
id: detailsButton
|
||||||
|
|
||||||
|
visible: swarmDetailsVisibility
|
||||||
|
|
||||||
|
source: JamiResources.swarm_details_panel_svg
|
||||||
|
toolTipText: JamiStrings.details
|
||||||
|
|
||||||
|
normalColor: JamiTheme.chatviewBgColor
|
||||||
|
imageColor: JamiTheme.chatviewButtonColor
|
||||||
|
|
||||||
|
onClicked: showDetailsClicked()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue