diff --git a/resources/icons/phone_in_talk_24dp.svg b/resources/icons/phone_in_talk_24dp.svg new file mode 100644 index 000000000..a35fd3889 --- /dev/null +++ b/resources/icons/phone_in_talk_24dp.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/app/commoncomponents/CallMessageDelegate.qml b/src/app/commoncomponents/CallMessageDelegate.qml index 0cefc116d..2547e6150 100644 --- a/src/app/commoncomponents/CallMessageDelegate.qml +++ b/src/app/commoncomponents/CallMessageDelegate.qml @@ -25,15 +25,17 @@ import net.jami.Constants 1.1 SBSMessageBase { id: root - component JoinCallButton: PushButton { + component JoinCallButton: MaterialButton { visible: root.isActive toolTipText: JamiStrings.joinCall - preferredSize: visible ? 40 : 0 - imageColor: callLabel.color - normalColor: "transparent" - hoveredColor: Qt.rgba(255, 255, 255, 0.2) - border.width: 1 - border.color: callLabel.color + color: JamiTheme.blackColor + background.opacity: hovered ? 0.2 : 0.1 + hoveredColor: JamiTheme.blackColor + contentColorProvider: JamiTheme.textColor + textOpacity: hovered ? 1 : 0.5 + buttontextHeightMargin: 16 + textLeftPadding: 9 + textRightPadding: 9 } property bool isRemoteImage @@ -43,6 +45,9 @@ SBSMessageBase { readers: Readers formattedTime: MessagesAdapter.getFormattedTime(Timestamp) + bubble.border.color: CurrentConversation.color + bubble.border.width: root.isActive ? 1.5 : 0 + Connections { target: CurrentConversation enabled: root.isActive @@ -69,18 +74,18 @@ SBSMessageBase { Layout.margins: 8 Layout.fillWidth: true - Layout.rightMargin: root.timeWidth + 16 + Layout.rightMargin: root.isActive ? 0 : root.timeWidth + 16 + Layout.leftMargin: root.isActive ? 10 : 8 text: { if (root.isActive) - return JamiStrings.joinCall; + return JamiStrings.startedACall; return Body; } horizontalAlignment: Qt.AlignHCenter font.pointSize: JamiTheme.mediumFontSize font.hintingPreference: Font.PreferNoHinting - font.bold: true renderType: Text.NativeRendering textFormat: Text.MarkdownText @@ -89,17 +94,21 @@ SBSMessageBase { JoinCallButton { id: joinCallInAudio + Layout.topMargin: 4 + Layout.bottomMargin: 4 - source: JamiResources.place_audiocall_24dp_svg + text: JamiStrings.joinInAudio onClicked: MessagesAdapter.joinCall(ActionUri, DeviceId, ConfId, true) } JoinCallButton { id: joinCallInVideo + text: JamiStrings.joinInVideo + Layout.topMargin: 4 + Layout.bottomMargin: 4 - source: JamiResources.videocam_24dp_svg onClicked: MessagesAdapter.joinCall(ActionUri, DeviceId, ConfId) - Layout.rightMargin: parent.spacing + Layout.rightMargin: 4 } } ] @@ -110,5 +119,8 @@ SBSMessageBase { duration: 100 } } - Component.onCompleted: opacity = 1 + Component.onCompleted: { + bubble.timestampItem.visible = !root.isActive; + opacity = 1; + } } diff --git a/src/app/commoncomponents/MaterialButton.qml b/src/app/commoncomponents/MaterialButton.qml index f3f67d25f..6c69ef4a8 100644 --- a/src/app/commoncomponents/MaterialButton.qml +++ b/src/app/commoncomponents/MaterialButton.qml @@ -46,6 +46,7 @@ AbstractButton { property real textRightPadding property real fontSize: JamiTheme.buttontextFontPixelSize property real textAlignment: Text.AlignHCenter + property real textOpacity: 1 checkable: false checked: false @@ -159,6 +160,7 @@ AbstractButton { horizontalAlignment: root.textAlignment color: contentColorProvider font.pixelSize: fontSize + opacity: root.textOpacity } } diff --git a/src/app/constant/JamiStrings.qml b/src/app/constant/JamiStrings.qml index 399d90440..1a3945e47 100644 --- a/src/app/constant/JamiStrings.qml +++ b/src/app/constant/JamiStrings.qml @@ -772,6 +772,9 @@ Item { property string edit: qsTr("Edit") property string edited: qsTr("Edited") property string joinCall: qsTr("Join call") + property string joinInAudio: qsTr("Join in audio") + property string joinInVideo: qsTr("Join in video") + property string startedACall: qsTr("Started a call") property string wantToJoin: qsTr("A call is in progress. Do you want to join the call?") property string needsHost: qsTr("Current host for this swarm seems unreachable. Do you want to host the call?") property string selectHost: qsTr("Select dedicated device for hosting future calls in this swarm. If not set, the host will be the device starting a call.") diff --git a/src/app/mainview/components/SmartListItemDelegate.qml b/src/app/mainview/components/SmartListItemDelegate.qml index ef54c8d36..dc3b1b22e 100644 --- a/src/app/mainview/components/SmartListItemDelegate.qml +++ b/src/app/mainview/components/SmartListItemDelegate.qml @@ -220,7 +220,8 @@ ItemDelegate { // Show that a call is ongoing for groups indicator ResponsiveImage { visible: ActiveCallsCount && !root.highlighted - source: JamiResources.videocam_24dp_svg + source: JamiResources.phone_in_talk_24dp_svg + containerWidth: 16 color: JamiTheme.primaryForegroundColor }