mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-06 15:55:48 +02:00
mainOverlay: add mosaic button
Gitlab: #409 Change-Id: I65e1c91184a95453c10633340a74f50cc4de7032
This commit is contained in:
parent
77aae84786
commit
b6aadb1277
12 changed files with 215 additions and 127 deletions
11
images/icons/mozaic_black_24dp.svg
Normal file
11
images/icons/mozaic_black_24dp.svg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#231F20;}
|
||||||
|
</style>
|
||||||
|
<path class="st0" d="M20.5,1.5h-17c-1.1,0-2,0.9-2,2v17c0,1.1,0.9,2,2,2h17c1.1,0,2-0.9,2-2v-17C22.5,2.4,21.6,1.5,20.5,1.5z
|
||||||
|
M21.1,3.5v7.8h-8.4V2.9h7.8C20.8,2.9,21.1,3.2,21.1,3.5z M3.5,2.9h7.8v8.4H2.9V3.5C2.9,3.2,3.2,2.9,3.5,2.9z M2.9,20.5v-7.8h8.4
|
||||||
|
v8.4H3.5C3.2,21.1,2.9,20.8,2.9,20.5z M20.5,21.1h-7.8v-8.4h8.4v7.8C21.1,20.8,20.8,21.1,20.5,21.1z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 755 B |
|
@ -6,6 +6,7 @@
|
||||||
<file>images/jami_rolling_spinner.gif</file>
|
<file>images/jami_rolling_spinner.gif</file>
|
||||||
<file>images/icons/baseline-close-24px.svg</file>
|
<file>images/icons/baseline-close-24px.svg</file>
|
||||||
<file>images/icons/cross_black_24dp.svg</file>
|
<file>images/icons/cross_black_24dp.svg</file>
|
||||||
|
<file>images/icons/mozaic_black_24dp.svg</file>
|
||||||
<file>images/icons/baseline-done-24px.svg</file>
|
<file>images/icons/baseline-done-24px.svg</file>
|
||||||
<file>images/icons/baseline-error_outline-24px.svg</file>
|
<file>images/icons/baseline-error_outline-24px.svg</file>
|
||||||
<file>projectcredits.html</file>
|
<file>projectcredits.html</file>
|
||||||
|
|
|
@ -629,6 +629,9 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
|
||||||
bool isAudioMuted = call->audioMuted && (call->status != lrc::api::call::Status::PAUSED);
|
bool isAudioMuted = call->audioMuted && (call->status != lrc::api::call::Status::PAUSED);
|
||||||
bool isVideoMuted = call->videoMuted && !isPaused && !call->isAudioOnly;
|
bool isVideoMuted = call->videoMuted && !isPaused && !call->isAudioOnly;
|
||||||
bool isRecording = isRecordingThisCall();
|
bool isRecording = isRecordingThisCall();
|
||||||
|
bool isConferenceCall = !convInfo.confId.isEmpty()
|
||||||
|
|| (convInfo.confId.isEmpty() && call->participantsInfos.size() != 0);
|
||||||
|
bool isGrid = call->layout == lrc::api::call::Layout::GRID;
|
||||||
auto bestName = convInfo.participants.isEmpty()
|
auto bestName = convInfo.participants.isEmpty()
|
||||||
? QString()
|
? QString()
|
||||||
: accInfo.contactModel->bestNameForContact(convInfo.participants[0]);
|
: accInfo.contactModel->bestNameForContact(convInfo.participants[0]);
|
||||||
|
@ -639,6 +642,8 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
|
||||||
isVideoMuted,
|
isVideoMuted,
|
||||||
isRecording,
|
isRecording,
|
||||||
accInfo.profileInfo.type == lrc::api::profile::Type::SIP,
|
accInfo.profileInfo.type == lrc::api::profile::Type::SIP,
|
||||||
|
isConferenceCall,
|
||||||
|
isGrid,
|
||||||
bestName);
|
bestName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,6 +717,20 @@ CallAdapter::minimizeParticipant(const QString& uri)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CallAdapter::showGridConferenceLayout()
|
||||||
|
{
|
||||||
|
auto* callModel = lrcInstance_->getAccountInfo(accountId_).callModel.get();
|
||||||
|
const auto& convInfo
|
||||||
|
= lrcInstance_->getConversationFromConvUid(lrcInstance_->get_selectedConvUid(), accountId_);
|
||||||
|
|
||||||
|
auto confId = convInfo.confId;
|
||||||
|
if (confId.isEmpty())
|
||||||
|
confId = convInfo.callId;
|
||||||
|
|
||||||
|
callModel->setConferenceLayout(confId, lrc::api::call::Layout::GRID);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CallAdapter::hangUpThisCall()
|
CallAdapter::hangUpThisCall()
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
Q_INVOKABLE void hangUpCall(const QString& callId);
|
Q_INVOKABLE void hangUpCall(const QString& callId);
|
||||||
Q_INVOKABLE void maximizeParticipant(const QString& uri);
|
Q_INVOKABLE void maximizeParticipant(const QString& uri);
|
||||||
Q_INVOKABLE void minimizeParticipant(const QString& uri);
|
Q_INVOKABLE void minimizeParticipant(const QString& uri);
|
||||||
|
Q_INVOKABLE void showGridConferenceLayout();
|
||||||
Q_INVOKABLE void hangUpThisCall();
|
Q_INVOKABLE void hangUpThisCall();
|
||||||
Q_INVOKABLE bool isCurrentHost() const;
|
Q_INVOKABLE bool isCurrentHost() const;
|
||||||
Q_INVOKABLE bool participantIsHost(const QString& uri) const;
|
Q_INVOKABLE bool participantIsHost(const QString& uri) const;
|
||||||
|
@ -95,6 +96,8 @@ Q_SIGNALS:
|
||||||
bool isVideoMuted,
|
bool isVideoMuted,
|
||||||
bool isRecording,
|
bool isRecording,
|
||||||
bool isSIP,
|
bool isSIP,
|
||||||
|
bool isConferenceCall,
|
||||||
|
bool isGrid,
|
||||||
const QString& bestName);
|
const QString& bestName);
|
||||||
void remoteRecordingChanged(const QStringList& peers, bool state);
|
void remoteRecordingChanged(const QStringList& peers, bool state);
|
||||||
void eraseRemoteRecording();
|
void eraseRemoteRecording();
|
||||||
|
|
|
@ -240,9 +240,6 @@ ColumnLayout {
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
text: ""
|
|
||||||
font.pointSize: 10
|
|
||||||
font.kerning: true
|
|
||||||
imageColor: JamiTheme.textColor
|
imageColor: JamiTheme.textColor
|
||||||
|
|
||||||
toolTipText: JamiStrings.takePhoto
|
toolTipText: JamiStrings.takePhoto
|
||||||
|
@ -284,10 +281,6 @@ ColumnLayout {
|
||||||
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
Layout.preferredHeight: JamiTheme.preferredFieldHeight
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
text: ""
|
|
||||||
font.pointSize: 10
|
|
||||||
font.kerning: true
|
|
||||||
|
|
||||||
radius: height / 6
|
radius: height / 6
|
||||||
source: "qrc:/images/icons/round-folder-24px.svg"
|
source: "qrc:/images/icons/round-folder-24px.svg"
|
||||||
|
|
||||||
|
|
|
@ -37,17 +37,18 @@ AbstractButton {
|
||||||
// Shape will default to a 15px circle
|
// Shape will default to a 15px circle
|
||||||
// but can be sized accordingly.
|
// but can be sized accordingly.
|
||||||
property int preferredSize: 30
|
property int preferredSize: 30
|
||||||
property int preferredWidth: preferredSize
|
|
||||||
property int preferredHeight: preferredSize
|
|
||||||
property int preferredMargin: 16
|
property int preferredMargin: 16
|
||||||
property alias textHAlign: textContent.horizontalAlignment
|
|
||||||
// Note the radius will default to preferredSize
|
// Note the radius will default to preferredSize
|
||||||
property alias radius: background.radius
|
property alias radius: background.radius
|
||||||
|
|
||||||
// Text properties
|
// Text properties
|
||||||
property alias buttonText: textContent.text
|
property alias buttonText: textContent.text
|
||||||
|
property alias buttonTextHeight: textContent.height
|
||||||
|
readonly property alias buttonTextWidth: textContent.width
|
||||||
|
property alias buttonTextFont: textContent.font
|
||||||
property alias buttonTextColor: textContent.color
|
property alias buttonTextColor: textContent.color
|
||||||
property alias fontPointSize: textContent.font.pointSize
|
property alias textHAlign: textContent.horizontalAlignment
|
||||||
|
property bool buttonTextEnableElide: false
|
||||||
|
|
||||||
property string toolTipText: ""
|
property string toolTipText: ""
|
||||||
|
|
||||||
|
@ -61,6 +62,8 @@ AbstractButton {
|
||||||
property int duration: JamiTheme.shortFadeDuration
|
property int duration: JamiTheme.shortFadeDuration
|
||||||
|
|
||||||
// Image properties
|
// Image properties
|
||||||
|
property alias imageContainerWidth: image.containerWidth
|
||||||
|
property alias imageContainerHeight: image.containerHeight
|
||||||
property alias source: image.source
|
property alias source: image.source
|
||||||
property var imageColor: null
|
property var imageColor: null
|
||||||
property string normalImageSource
|
property string normalImageSource
|
||||||
|
@ -81,6 +84,63 @@ AbstractButton {
|
||||||
ToolTip.visible: hovered && (toolTipText.length > 0)
|
ToolTip.visible: hovered && (toolTipText.length > 0)
|
||||||
ToolTip.text: toolTipText
|
ToolTip.text: toolTipText
|
||||||
|
|
||||||
|
ResponsiveImage {
|
||||||
|
id: image
|
||||||
|
|
||||||
|
anchors.centerIn: textContent.text ? undefined : root
|
||||||
|
anchors.left: textContent.text ? root.left : undefined
|
||||||
|
anchors.leftMargin: textContent.text ? preferredMargin : 0
|
||||||
|
anchors.verticalCenter: root.verticalCenter
|
||||||
|
|
||||||
|
containerHeight: preferredSize
|
||||||
|
containerWidth: preferredSize
|
||||||
|
|
||||||
|
source: {
|
||||||
|
if (checkable && checkedImageSource)
|
||||||
|
return checked ? checkedImageSource : normalImageSource
|
||||||
|
else
|
||||||
|
return normalImageSource
|
||||||
|
}
|
||||||
|
|
||||||
|
layer {
|
||||||
|
enabled: imageColor || checkedColor
|
||||||
|
effect: ColorOverlay {
|
||||||
|
id: overlay
|
||||||
|
color: {
|
||||||
|
if (checked && checkedImageColor)
|
||||||
|
return checkedImageColor
|
||||||
|
else if (imageColor)
|
||||||
|
return imageColor
|
||||||
|
else
|
||||||
|
return JamiTheme.transparentColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Mipmap does not render correctly on linux
|
||||||
|
mipmap: false
|
||||||
|
smooth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: textContent
|
||||||
|
|
||||||
|
anchors.left: image.right
|
||||||
|
anchors.leftMargin: preferredMargin
|
||||||
|
anchors.verticalCenter: root.verticalCenter
|
||||||
|
|
||||||
|
anchors.right: buttonTextEnableElide ? root.right : undefined
|
||||||
|
anchors.rightMargin: preferredMargin
|
||||||
|
|
||||||
|
visible: text ? true : false
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
color: JamiTheme.primaryForegroundColor
|
||||||
|
font.kerning: true
|
||||||
|
font.pointSize: 9
|
||||||
|
elide: Qt.ElideRight
|
||||||
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: background
|
id: background
|
||||||
|
|
||||||
|
@ -119,64 +179,5 @@ AbstractButton {
|
||||||
ColorAnimation { duration: root.duration }
|
ColorAnimation { duration: root.duration }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
ResponsiveImage {
|
|
||||||
id: image
|
|
||||||
|
|
||||||
containerWidth: preferredSize
|
|
||||||
containerHeight: preferredSize
|
|
||||||
|
|
||||||
anchors.verticalCenter: background.verticalCenter
|
|
||||||
anchors.horizontalCenter: textContent.text ? undefined : parent.horizontalCenter
|
|
||||||
anchors.left: textContent.text ? parent.left : undefined
|
|
||||||
anchors.leftMargin: preferredMargin
|
|
||||||
|
|
||||||
source: {
|
|
||||||
if (checkable && checkedImageSource)
|
|
||||||
return checked ? checkedImageSource : normalImageSource
|
|
||||||
else
|
|
||||||
return normalImageSource
|
|
||||||
}
|
|
||||||
|
|
||||||
layer {
|
|
||||||
enabled: imageColor || checkedColor
|
|
||||||
effect: ColorOverlay {
|
|
||||||
id: overlay
|
|
||||||
color: {
|
|
||||||
if (checked && checkedImageColor)
|
|
||||||
return checkedImageColor
|
|
||||||
else if (imageColor)
|
|
||||||
return imageColor
|
|
||||||
else
|
|
||||||
return JamiTheme.transparentColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Mipmap does not render correctly on linux
|
|
||||||
mipmap: false
|
|
||||||
smooth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: textContent
|
|
||||||
|
|
||||||
anchors.left: {
|
|
||||||
if (image.source.toString() !== '')
|
|
||||||
return image.right
|
|
||||||
else
|
|
||||||
return background.left
|
|
||||||
}
|
|
||||||
anchors.leftMargin: preferredMargin
|
|
||||||
anchors.right: background.right
|
|
||||||
anchors.rightMargin: preferredMargin
|
|
||||||
anchors.verticalCenter: background.verticalCenter
|
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
|
|
||||||
color: JamiTheme.primaryForegroundColor
|
|
||||||
font.kerning: true
|
|
||||||
font.pointSize: 9
|
|
||||||
elide: Qt.ElideRight
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,7 @@ Item {
|
||||||
property string addParticipants: qsTr("Add participants")
|
property string addParticipants: qsTr("Add participants")
|
||||||
property string chat: qsTr("Chat")
|
property string chat: qsTr("Chat")
|
||||||
property string moreOptions: qsTr("More options")
|
property string moreOptions: qsTr("More options")
|
||||||
|
property string mozaic: qsTr("Mozaic")
|
||||||
|
|
||||||
// CallViewContextMenu
|
// CallViewContextMenu
|
||||||
property string hold: qsTr("Hold")
|
property string hold: qsTr("Hold")
|
||||||
|
|
|
@ -91,6 +91,7 @@ Item {
|
||||||
property color acceptGreenTransparency: rgba256(11, 130, 113, 56)
|
property color acceptGreenTransparency: rgba256(11, 130, 113, 56)
|
||||||
property color refuseRed: rgba256(204, 0, 34, 100)
|
property color refuseRed: rgba256(204, 0, 34, 100)
|
||||||
property color refuseRedTransparent: rgba256(204, 0, 34, 56)
|
property color refuseRedTransparent: rgba256(204, 0, 34, 56)
|
||||||
|
property color mozaicButtonNormalColor: "#272727"
|
||||||
|
|
||||||
property color closeButtonLighterBlack: "#4c4c4c"
|
property color closeButtonLighterBlack: "#4c4c4c"
|
||||||
|
|
||||||
|
@ -204,6 +205,14 @@ Item {
|
||||||
property int participantCallInStatusFontSize: 9
|
property int participantCallInStatusFontSize: 9
|
||||||
property int participantCallInStatusTextWidthLimit: 100
|
property int participantCallInStatusTextWidthLimit: 100
|
||||||
property int participantCallInStatusTextWidth: 68
|
property int participantCallInStatusTextWidth: 68
|
||||||
|
property int mozaicButtonRadius: 5
|
||||||
|
property int mozaicButtonPreferredMargin: 5
|
||||||
|
property real mozaicButtonOpacity: 0.77
|
||||||
|
property int mozaicButtonTextPreferredWidth: 40
|
||||||
|
property int mozaicButtonTextPreferredHeight: 16
|
||||||
|
property int mozaicButtonTextPointSize: 8
|
||||||
|
property int mozaicButtonPreferredWidth: 70
|
||||||
|
property int mozaicButtonMaxWidth: 100
|
||||||
|
|
||||||
property real maximumWidthSettingsView: 600
|
property real maximumWidthSettingsView: 600
|
||||||
property real settingsHeaderpreferredHeight: 64
|
property real settingsHeaderpreferredHeight: 64
|
||||||
|
|
|
@ -47,12 +47,17 @@ Item {
|
||||||
property bool isRecording
|
property bool isRecording
|
||||||
property bool isSIP
|
property bool isSIP
|
||||||
property bool isModerator
|
property bool isModerator
|
||||||
|
property bool isConferenceCall
|
||||||
|
property bool isGrid
|
||||||
|
|
||||||
property string bestName: ""
|
property string bestName: ""
|
||||||
|
|
||||||
signal chatButtonClicked
|
signal chatButtonClicked
|
||||||
|
|
||||||
onVisibleChanged: if (!visible) callViewContextMenu.close()
|
onVisibleChanged: {
|
||||||
|
if (!visible)
|
||||||
|
callViewContextMenu.close()
|
||||||
|
}
|
||||||
|
|
||||||
ParticipantsLayer {
|
ParticipantsLayer {
|
||||||
id: __participantsLayer
|
id: __participantsLayer
|
||||||
|
@ -66,7 +71,8 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateUI(isPaused, isAudioOnly, isAudioMuted,
|
function updateUI(isPaused, isAudioOnly, isAudioMuted,
|
||||||
isVideoMuted, isRecording, isSIP) {
|
isVideoMuted, isRecording, isSIP,
|
||||||
|
isConferenceCall, isGrid) {
|
||||||
if (isPaused !== undefined) {
|
if (isPaused !== undefined) {
|
||||||
root.isPaused = isPaused
|
root.isPaused = isPaused
|
||||||
root.isAudioOnly = isAudioOnly
|
root.isAudioOnly = isAudioOnly
|
||||||
|
@ -74,9 +80,10 @@ Item {
|
||||||
root.isVideoMuted = isVideoMuted
|
root.isVideoMuted = isVideoMuted
|
||||||
root.isRecording = isRecording
|
root.isRecording = isRecording
|
||||||
root.isSIP = isSIP
|
root.isSIP = isSIP
|
||||||
|
root.isConferenceCall = isConferenceCall
|
||||||
|
root.isGrid = isGrid
|
||||||
mainOverlay.recordingVisible = isRecording
|
mainOverlay.recordingVisible = isRecording
|
||||||
}
|
}
|
||||||
|
|
||||||
root.isModerator = CallAdapter.isCurrentModerator()
|
root.isModerator = CallAdapter.isCurrentModerator()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,13 +117,10 @@ Item {
|
||||||
label += ", "
|
label += ", "
|
||||||
i += 1
|
i += 1
|
||||||
}
|
}
|
||||||
label += " " + ((peers.length > 1)? JamiStrings.areRecording
|
label += " " + ((peers.length > 1) ? JamiStrings.areRecording : JamiStrings.isRecording)
|
||||||
: JamiStrings.isRecording)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mainOverlay.remoteRecordingLabel = state ?
|
mainOverlay.remoteRecordingLabel = state ? label : JamiStrings.peerStoppedRecording
|
||||||
label :
|
|
||||||
JamiStrings.peerStoppedRecording
|
|
||||||
callViewContextMenu.peerIsRecording = state
|
callViewContextMenu.peerIsRecording = state
|
||||||
mainOverlay.recordingVisible = callViewContextMenu.localIsRecording
|
mainOverlay.recordingVisible = callViewContextMenu.localIsRecording
|
||||||
|| callViewContextMenu.peerIsRecording
|
|| callViewContextMenu.peerIsRecording
|
||||||
|
|
|
@ -51,9 +51,10 @@ Item {
|
||||||
|
|
||||||
// (un)subscribe to an app-wide mouse move event trap filtered
|
// (un)subscribe to an app-wide mouse move event trap filtered
|
||||||
// for the overlay's geometry
|
// for the overlay's geometry
|
||||||
onVisibleChanged: visible ?
|
onVisibleChanged: visible ? CallOverlayModel.registerFilter(
|
||||||
CallOverlayModel.registerFilter(appWindow, this) :
|
appWindow,
|
||||||
CallOverlayModel.unregisterFilter(appWindow, this)
|
this) : CallOverlayModel.unregisterFilter(
|
||||||
|
appWindow, this)
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: CallOverlayModel
|
target: CallOverlayModel
|
||||||
|
@ -104,25 +105,21 @@ Item {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: jamiBestNameText
|
id: jamiBestNameText
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
||||||
Layout.preferredWidth: overlayUpperPartRect.width / 3
|
Layout.preferredWidth: overlayUpperPartRect.width / 2
|
||||||
Layout.preferredHeight: 50
|
Layout.preferredHeight: 50
|
||||||
leftPadding: 16
|
|
||||||
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
leftPadding: 16
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
text: textMetricsjamiBestNameText.elidedText
|
font.pointSize: JamiTheme.textFontSize
|
||||||
color: "white"
|
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricsjamiBestNameText
|
|
||||||
font: jamiBestNameText.font
|
|
||||||
text: {
|
text: {
|
||||||
if (!root.isAudioOnly) {
|
if (!root.isAudioOnly) {
|
||||||
if (remoteRecordingLabel === "") {
|
if (remoteRecordingLabel === "") {
|
||||||
|
@ -133,51 +130,92 @@ Item {
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
elideWidth: overlayUpperPartRect.width / 3
|
color: JamiTheme.whiteColor
|
||||||
elide: Qt.ElideRight
|
elide: Qt.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PushButton {
|
||||||
|
id: mozaicButton
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
|
Layout.preferredWidth: JamiTheme.mozaicButtonPreferredWidth
|
||||||
|
Layout.preferredHeight: 30
|
||||||
|
Layout.rightMargin: 5
|
||||||
|
|
||||||
|
visible: isConferenceCall && !isGrid
|
||||||
|
|
||||||
|
preferredMargin: JamiTheme.mozaicButtonPreferredMargin
|
||||||
|
radius: JamiTheme.mozaicButtonRadius
|
||||||
|
opacity: JamiTheme.mozaicButtonOpacity
|
||||||
|
|
||||||
|
buttonText: JamiStrings.mozaic
|
||||||
|
buttonTextColor: JamiTheme.whiteColor
|
||||||
|
buttonTextHeight: JamiTheme.mozaicButtonTextPreferredHeight
|
||||||
|
buttonTextFont.weight: Font.DemiBold
|
||||||
|
buttonTextFont.pointSize: JamiTheme.mozaicButtonTextPointSize
|
||||||
|
textHAlign: Text.AlignLeft
|
||||||
|
|
||||||
|
imageColor: JamiTheme.whiteColor
|
||||||
|
imageContainerHeight: 20
|
||||||
|
imageContainerWidth: 20
|
||||||
|
source: "qrc:/images/icons/mozaic_black_24dp.svg"
|
||||||
|
|
||||||
|
normalColor: JamiTheme.mozaicButtonNormalColor
|
||||||
|
onButtonTextWidthChanged: {
|
||||||
|
if (buttonTextWidth > JamiTheme.mozaicButtonTextPreferredWidth) {
|
||||||
|
if (mozaicButton.Layout.preferredWidth + buttonTextWidth
|
||||||
|
- JamiTheme.mozaicButtonTextPreferredWidth
|
||||||
|
> JamiTheme.mozaicButtonMaxWidth) {
|
||||||
|
mozaicButton.Layout.preferredWidth = JamiTheme.mozaicButtonMaxWidth
|
||||||
|
buttonTextEnableElide = true
|
||||||
|
} else
|
||||||
|
mozaicButton.Layout.preferredWidth += buttonTextWidth
|
||||||
|
- JamiTheme.mozaicButtonTextPreferredWidth
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: CallAdapter.showGridConferenceLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: callTimerText
|
id: callTimerText
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
Layout.preferredWidth: 64
|
|
||||||
Layout.minimumWidth: 64
|
|
||||||
Layout.preferredHeight: 48
|
Layout.preferredHeight: 48
|
||||||
Layout.rightMargin: recordingRect.visible?
|
Layout.rightMargin: recordingRect.visible ? 0 : JamiTheme.preferredMarginSize
|
||||||
0 : JamiTheme.preferredMarginSize
|
|
||||||
font.pointSize: JamiTheme.textFontSize
|
font.pointSize: JamiTheme.textFontSize
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: textMetricscallTimerText.elidedText
|
|
||||||
color: "white"
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricscallTimerText
|
|
||||||
font: callTimerText.font
|
|
||||||
text: timeText
|
text: timeText
|
||||||
elideWidth: overlayUpperPartRect.width / 4
|
color: JamiTheme.whiteColor
|
||||||
elide: Qt.ElideRight
|
elide: Qt.ElideRight
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: recordingRect
|
id: recordingRect
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||||
|
|
||||||
height: 16
|
height: 16
|
||||||
width: 16
|
width: 16
|
||||||
|
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
color: "red"
|
color: JamiTheme.recordIconColor
|
||||||
|
|
||||||
SequentialAnimation on color {
|
SequentialAnimation on color {
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
running: true
|
running: true
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
from: "red"; to: "transparent";
|
from: JamiTheme.recordIconColor
|
||||||
|
to: "transparent"
|
||||||
duration: JamiTheme.recordBlinkDuration
|
duration: JamiTheme.recordBlinkDuration
|
||||||
}
|
}
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
from: "transparent"; to: "red";
|
from: "transparent"
|
||||||
|
to: JamiTheme.recordIconColor
|
||||||
duration: JamiTheme.recordBlinkDuration
|
duration: JamiTheme.recordBlinkDuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,5 +244,9 @@ Item {
|
||||||
height: 55
|
height: 55
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity { NumberAnimation { duration: JamiTheme.overlayFadeDuration }}
|
Behavior on opacity {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: JamiTheme.overlayFadeDuration
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,15 +50,17 @@ Rectangle {
|
||||||
|
|
||||||
onAccountPeerPairChanged: {
|
onAccountPeerPairChanged: {
|
||||||
if (accountPeerPair[0] === "" || accountPeerPair[1] === "")
|
if (accountPeerPair[0] === "" || accountPeerPair[1] === "")
|
||||||
return;
|
return
|
||||||
contactImage.updateImage(accountPeerPair[1])
|
contactImage.updateImage(accountPeerPair[1])
|
||||||
callOverlay.participantsLayer.update(CallAdapter.getConferencesInfos())
|
callOverlay.participantsLayer.update(CallAdapter.getConferencesInfos())
|
||||||
|
|
||||||
bestName = UtilsAdapter.getBestName(accountPeerPair[0], accountPeerPair[1])
|
bestName = UtilsAdapter.getBestName(accountPeerPair[0],
|
||||||
|
accountPeerPair[1])
|
||||||
var id = UtilsAdapter.getBestId(accountPeerPair[0], accountPeerPair[1])
|
var id = UtilsAdapter.getBestId(accountPeerPair[0], accountPeerPair[1])
|
||||||
bestId = (bestName !== id) ? id : ""
|
bestId = (bestName !== id) ? id : ""
|
||||||
|
|
||||||
root.callId = UtilsAdapter.getCallId(accountPeerPair[0], accountPeerPair[1])
|
root.callId = UtilsAdapter.getCallId(accountPeerPair[0],
|
||||||
|
accountPeerPair[1])
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLinkedWebview(webViewId) {
|
function setLinkedWebview(webViewId) {
|
||||||
|
@ -266,7 +268,6 @@ Rectangle {
|
||||||
var deltaW = previewRenderer.x + delta.x + previewRenderer.width
|
var deltaW = previewRenderer.x + delta.x + previewRenderer.width
|
||||||
var deltaH = previewRenderer.y + delta.y + previewRenderer.height
|
var deltaH = previewRenderer.y + delta.y + previewRenderer.height
|
||||||
|
|
||||||
|
|
||||||
// Check if the previewRenderer exceeds the border of callPageMainRect.
|
// Check if the previewRenderer exceeds the border of callPageMainRect.
|
||||||
if (deltaW < callPageMainRect.width
|
if (deltaW < callPageMainRect.width
|
||||||
&& previewRenderer.x + delta.x > 1)
|
&& previewRenderer.x + delta.x > 1)
|
||||||
|
@ -303,11 +304,14 @@ Rectangle {
|
||||||
target: CallAdapter
|
target: CallAdapter
|
||||||
|
|
||||||
function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted,
|
function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted,
|
||||||
isRecording, isSIP, bestName) {
|
isRecording, isSIP, isConferenceCall, isGrid,
|
||||||
|
bestName) {
|
||||||
callOverlay.showOnHoldImage(isPaused)
|
callOverlay.showOnHoldImage(isPaused)
|
||||||
audioCallPageRectCentralRect.visible = !isPaused && root.isAudioOnly
|
audioCallPageRectCentralRect.visible = !isPaused && root.isAudioOnly
|
||||||
callOverlay.updateUI(isPaused, isAudioOnly, isAudioMuted, isVideoMuted,
|
callOverlay.updateUI(isPaused, isAudioOnly,
|
||||||
isRecording, isSIP)
|
isAudioMuted, isVideoMuted,
|
||||||
|
isRecording, isSIP,
|
||||||
|
isConferenceCall, isGrid)
|
||||||
root.bestName = bestName
|
root.bestName = bestName
|
||||||
callOverlay.participantsLayer.update(CallAdapter.getConferencesInfos())
|
callOverlay.participantsLayer.update(CallAdapter.getConferencesInfos())
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ Rectangle {
|
||||||
pressedColor: Qt.lighter(JamiTheme.pressedButtonColor, 1.25)
|
pressedColor: Qt.lighter(JamiTheme.pressedButtonColor, 1.25)
|
||||||
checkedColor: JamiTheme.selectedColor
|
checkedColor: JamiTheme.selectedColor
|
||||||
hoveredColor: JamiTheme.hoverColor
|
hoveredColor: JamiTheme.hoverColor
|
||||||
fontPointSize: JamiTheme.textFontSize + 2
|
buttonTextFont.pointSize: JamiTheme.textFontSize + 2
|
||||||
duration: 0
|
duration: 0
|
||||||
textHAlign: Text.AlignLeft
|
textHAlign: Text.AlignLeft
|
||||||
preferredMargin: 24
|
preferredMargin: 24
|
||||||
|
|
Loading…
Add table
Reference in a new issue