mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-16 14:41:25 +08:00
call_button: adapted structure and calls compatibility
* Listview only visible when there are different hosts * Works only for audio calls Change-Id: Id4606b7afc9eb01a6d4570d79c6821554d5829cd
This commit is contained in:
committed by
Adrien Beraud
parent
4c0b663a42
commit
2dbb5d3ed7
@@ -155,22 +155,26 @@ SBSMessageBase {
|
||||
JoinCallButton {
|
||||
id: joinCallWithAudio
|
||||
objectName: "joinCallWithAudio"
|
||||
Layout.topMargin: 4
|
||||
Layout.bottomMargin: 4
|
||||
source: JamiResources.place_audiocall_24dp_svg
|
||||
Layout.leftMargin: 10
|
||||
onClicked: MessagesAdapter.joinCall(ActionUri, DeviceId, root.confId, true)
|
||||
|
||||
text: JamiStrings.joinWithAudio
|
||||
onClicked: MessagesAdapter.joinCall(ActionUri, DeviceId, rootDelegate.confId, true)
|
||||
}
|
||||
width: 40
|
||||
height: 40
|
||||
|
||||
JoinCallButton {
|
||||
id: joinCallWithVideo
|
||||
objectName: "joinCallWithVideo"
|
||||
text: JamiStrings.joinWithVideo
|
||||
Layout.topMargin: 4
|
||||
Layout.bottomMargin: 4
|
||||
|
||||
onClicked: MessagesAdapter.joinCall(ActionUri, DeviceId, rootDelegate.confId)
|
||||
Layout.rightMargin: 4
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask {
|
||||
source: joinCallWithAudio
|
||||
maskSource: Rectangle {
|
||||
radius: 10
|
||||
width: joinCallWithAudio.width
|
||||
height: joinCallWithAudio.height
|
||||
Rectangle {
|
||||
width: parent.width / 2
|
||||
height: parent.height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -33,13 +33,15 @@ Rectangle {
|
||||
|
||||
property bool darkTheme: UtilsAdapter.useApplicationTheme()
|
||||
property bool isDropDownOpen: false
|
||||
property bool activeCalls: CurrentConversation.activeCalls.length > 0
|
||||
property bool uniqueActiveCall: CurrentConversation.activeCalls.length === 1
|
||||
property bool activeCalls: CurrentConversation.activeCalls.length > 1
|
||||
|
||||
RowLayout {
|
||||
|
||||
anchors.fill: parent
|
||||
Layout.fillWidth: false
|
||||
spacing: 0
|
||||
visible: uniqueActiveCall
|
||||
|
||||
Item {
|
||||
|
||||
@@ -48,18 +50,18 @@ Rectangle {
|
||||
JamiPushButton {
|
||||
id: callButton
|
||||
source: JamiResources.place_audiocall_24dp_svg
|
||||
normalColor: "#20c68d"
|
||||
hoveredColor: "#00796B"
|
||||
imageColor: hovered ? "#20c68d" : "black"
|
||||
normalColor: JamiTheme.buttonCallLightGreen
|
||||
hoveredColor: JamiTheme.buttonCallDarkGreen
|
||||
imageColor: hovered ? JamiTheme.buttonCallLightGreen : JamiTheme.blackColor
|
||||
radius: 35
|
||||
preferredSize: 36
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: CallAdapter.placeCall()
|
||||
onClicked: CallAdapter.placeAudioOnlyCall()
|
||||
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: spinnerLoader
|
||||
active: CurrentConversation.activeCalls.length > 0
|
||||
sourceComponent: spinner
|
||||
anchors.centerIn: callButton
|
||||
}
|
||||
@@ -116,20 +118,16 @@ Rectangle {
|
||||
JamiPushButton {
|
||||
id: expandArrow
|
||||
visible: activeCalls
|
||||
|
||||
source: dropdownPopup.visible ? JamiResources.expand_more_24dp_svg : JamiResources.expand_less_24dp_svg
|
||||
normalColor: "#00ffffff"
|
||||
enabled: !dropdownPopup.visible
|
||||
source: dropdownPopup.visible ? JamiResources.expand_less_24dp_svg : JamiResources.expand_more_24dp_svg
|
||||
normalColor: JamiTheme.transparentColor
|
||||
imageColor: !darkTheme ? JamiTheme.blackColor : JamiTheme.whiteColor
|
||||
preferredSize: 20
|
||||
hoveredColor: normalColor
|
||||
Layout.rightMargin: 5
|
||||
|
||||
onClicked: {
|
||||
if (dropdownPopup.visible) {
|
||||
dropdownPopup.close();
|
||||
} else {
|
||||
dropdownPopup.open();
|
||||
}
|
||||
dropdownPopup.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,12 +160,12 @@ Rectangle {
|
||||
|
||||
width: listView.width
|
||||
height: 50
|
||||
color: "transparent"
|
||||
color: JamiTheme.transparentColor
|
||||
property bool isHovered: false
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: isHovered ? (darkTheme ? Qt.lighter(JamiTheme.darkGreyColor, 1.2) : Qt.darker(JamiTheme.lightGrey_, 1.1)) : "transparent"
|
||||
color: isHovered ? (darkTheme ? Qt.lighter(JamiTheme.darkGreyColor, 1.2) : Qt.darker(JamiTheme.lightGrey_, 1.1)) : JamiTheme.transparentColor
|
||||
radius: 5
|
||||
}
|
||||
|
||||
@@ -184,20 +182,14 @@ Rectangle {
|
||||
width: parent.width
|
||||
text: UtilsAdapter.getBestNameForUri(CurrentAccount.id, modelData.uri) + "'s call"
|
||||
color: darkTheme ? JamiTheme.whiteColor : JamiTheme.blackColor
|
||||
font.pixelSize: 14
|
||||
font.pixelSize: JamiTheme.headerFontSize
|
||||
font.bold: true
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
text: {
|
||||
"text";
|
||||
|
||||
//console.info(modelData.id)
|
||||
//console.info(CallAdapter.getCallDurationTime(currentAccountId, modelData.id)) //currentAccountId
|
||||
|
||||
}
|
||||
text: modelData.uri
|
||||
color: darkTheme ? JamiTheme.whiteColor : JamiTheme.blackColor
|
||||
font.pixelSize: 12
|
||||
elide: Text.ElideRight
|
||||
@@ -208,15 +200,11 @@ Rectangle {
|
||||
Layout.preferredWidth: 35
|
||||
Layout.preferredHeight: 35
|
||||
source: CurrentCall.isAudioOnly ? JamiResources.place_audiocall_24dp_svg : JamiResources.videocam_24dp_svg
|
||||
normalColor: "#20c68d"
|
||||
imageColor: "black"
|
||||
normalColor: JamiTheme.buttonCallLightGreen
|
||||
imageColor: JamiTheme.blackColor
|
||||
radius: 35
|
||||
hoveredColor: "pink"
|
||||
onClicked: MessagesAdapter.joinCall(modelData.uri, modelData.device, modelData.id, true); //CurrentCall.isAudioOnly
|
||||
|
||||
onClicked: {
|
||||
console.info("Call button clicked for ID:", modelData.uri);
|
||||
MessagesAdapter.joinCall(modalData.ActionUri, modalData.DeviceId, CurrentConversation.confId, CurrentCall.isAudioOnly);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,6 @@ Rectangle {
|
||||
QWKSetParentHitTestVisible {
|
||||
}
|
||||
Layout.preferredHeight: 36
|
||||
//Layout.preferredWidth: 80
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
visible: CurrentConversation.activeCalls.length > 0 && interactionButtonsVisibility && (!addMemberVisibility || UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm))
|
||||
}
|
||||
|
||||
@@ -147,6 +147,10 @@ Item {
|
||||
|
||||
property color editButtonBorderColor: darkTheme ? "#333333" : "#F0EFEF"
|
||||
|
||||
// Calls button
|
||||
property color buttonCallLightGreen: "#20C68D"
|
||||
property color buttonCallDarkGreen: "#00796B"
|
||||
|
||||
// Jami switch
|
||||
property color switchBackgroundCheckedColor: "#8dbaea"
|
||||
property color switchBackgroundColor: darkTheme ? "#626262" : "#E5EEF5"
|
||||
|
||||
Reference in New Issue
Block a user