mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-20 07:25:24 +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 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,119 +144,108 @@ 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
|
||||
PushButton {
|
||||
id: startAAudioCallButton
|
||||
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.rightMargin: 8
|
||||
spacing: 16
|
||||
Layout.fillWidth: true
|
||||
visible: interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
||||
|
||||
PushButton {
|
||||
id: startAAudioCallButton
|
||||
source: JamiResources.place_audiocall_24dp_svg
|
||||
toolTipText: JamiStrings.placeAudioCall
|
||||
|
||||
visible: interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
||||
normalColor: JamiTheme.chatviewBgColor
|
||||
imageColor: JamiTheme.chatviewButtonColor
|
||||
|
||||
source: JamiResources.place_audiocall_24dp_svg
|
||||
toolTipText: JamiStrings.placeAudioCall
|
||||
onClicked: CallAdapter.placeAudioOnlyCall()
|
||||
}
|
||||
|
||||
normalColor: JamiTheme.chatviewBgColor
|
||||
imageColor: JamiTheme.chatviewButtonColor
|
||||
PushButton {
|
||||
id: startAVideoCallButton
|
||||
|
||||
onClicked: CallAdapter.placeAudioOnlyCall()
|
||||
}
|
||||
visible: CurrentAccount.videoEnabled_Video && interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
||||
source: JamiResources.videocam_24dp_svg
|
||||
toolTipText: JamiStrings.placeVideoCall
|
||||
|
||||
PushButton {
|
||||
id: startAVideoCallButton
|
||||
normalColor: JamiTheme.chatviewBgColor
|
||||
imageColor: JamiTheme.chatviewButtonColor
|
||||
|
||||
visible: CurrentAccount.videoEnabled_Video && interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
||||
source: JamiResources.videocam_24dp_svg
|
||||
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()
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue