Stickers: names, addresses, mute decoration, sizes
This commit is contained in:
parent
fdbd8dbc87
commit
3c1cde46f7
7 changed files with 68 additions and 19 deletions
|
|
@ -666,7 +666,7 @@ Window {
|
||||||
Component {
|
Component {
|
||||||
id: screencastPanel
|
id: screencastPanel
|
||||||
ScreencastPanel {
|
ScreencastPanel {
|
||||||
call: mainwindow.call
|
call: mainWindow.call
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Partage de votre écran")
|
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Partage de votre écran")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@ RowLayout {
|
||||||
Layout.preferredHeight: 330 * DefaultStyle.dp
|
Layout.preferredHeight: 330 * DefaultStyle.dp
|
||||||
Layout.preferredWidth: 558 * DefaultStyle.dp
|
Layout.preferredWidth: 558 * DefaultStyle.dp
|
||||||
qmlName: "WP"
|
qmlName: "WP"
|
||||||
|
displayAll: false
|
||||||
|
displayPresence: false
|
||||||
|
bigBottomAddress: true
|
||||||
|
mutedStatus: microButton.checked
|
||||||
AccountProxy{
|
AccountProxy{
|
||||||
id: accounts
|
id: accounts
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,18 +10,19 @@ Button {
|
||||||
property string checkedIconUrl
|
property string checkedIconUrl
|
||||||
property color color: DefaultStyle.grey_500
|
property color color: DefaultStyle.grey_500
|
||||||
property color checkedColor: color
|
property color checkedColor: color
|
||||||
|
property color backgroundColor: mainItem.enabled
|
||||||
|
? mainItem.pressed || mainItem.checked
|
||||||
|
? mainItem.checkedColor
|
||||||
|
: mainItem.color
|
||||||
|
: DefaultStyle.grey_600
|
||||||
checkable: true
|
checkable: true
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: mainItem.enabled
|
color: mainItem.backgroundColor
|
||||||
? mainItem.pressed || mainItem.checked
|
|
||||||
? mainItem.checkedColor
|
|
||||||
: mainItem.color
|
|
||||||
: DefaultStyle.grey_600
|
|
||||||
radius: mainItem.width * 1.29
|
radius: mainItem.width * 1.29
|
||||||
}
|
}
|
||||||
icon.source: checkedIconUrl && mainItem.checked ? checkedIconUrl : iconUrl
|
icon.source: checkedIconUrl && mainItem.checked ? checkedIconUrl : iconUrl
|
||||||
icon.width: width * 0.58
|
icon.width: width * 0.58
|
||||||
icon.height: width * 0.58
|
icon.height: width * 0.58
|
||||||
contentImageColor: enabled ? DefaultStyle.grey_0 : DefaultStyle.grey_500
|
contentImageColor: enabled ? DefaultStyle.grey_0 : DefaultStyle.grey_500
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@ StackView {
|
||||||
onHaveAvatarChanged: replace(haveAvatar ? avatar : initials, StackView.Immediate)
|
onHaveAvatarChanged: replace(haveAvatar ? avatar : initials, StackView.Immediate)
|
||||||
|
|
||||||
property bool secured: false
|
property bool secured: false
|
||||||
|
property bool displayPresence: (account || contact) && (account
|
||||||
|
? account.core.registrationState != LinphoneEnums.RegistrationState.Progress && account.core.registrationState != LinphoneEnums.RegistrationState.Refreshing
|
||||||
|
: contact.core.consolidatedPresence != LinphoneEnums.ConsolidatedPresence.Offline)
|
||||||
|
|
||||||
initialItem: haveAvatar ? avatar : initials
|
initialItem: haveAvatar ? avatar : initials
|
||||||
|
|
||||||
|
|
@ -57,9 +60,7 @@ StackView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: (account || contact) && (account
|
visible: mainItem.displayPresence
|
||||||
? account.core.registrationState != LinphoneEnums.RegistrationState.Progress && account.core.registrationState != LinphoneEnums.RegistrationState.Refreshing
|
|
||||||
: contact.core.consolidatedPresence != LinphoneEnums.ConsolidatedPresence.Offline)
|
|
||||||
width: mainItem.width/4.5
|
width: mainItem.width/4.5
|
||||||
height: width
|
height: width
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
|
|
@ -110,10 +111,12 @@ StackView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
visible: initialItem.initials.length === 0
|
visible: initialItem.initials == ''
|
||||||
width: mainItem.width/3
|
width: mainItem.width/3
|
||||||
height: width
|
height: width
|
||||||
source: AppIcons.profile
|
source: AppIcons.profile
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ Item {
|
||||||
property AccountGui account: null
|
property AccountGui account: null
|
||||||
property ParticipantDeviceGui participantDevice: null
|
property ParticipantDeviceGui participantDevice: null
|
||||||
property bool displayBorder : participantDevice && participantDevice.core.isSpeaking || false
|
property bool displayBorder : participantDevice && participantDevice.core.isSpeaking || false
|
||||||
|
property alias displayPresence: avatar.displayPresence
|
||||||
property color color: DefaultStyle.grey_600
|
property color color: DefaultStyle.grey_600
|
||||||
property int radius: 15 * DefaultStyle.dp
|
property int radius: 15 * DefaultStyle.dp
|
||||||
property var peerAddressObj: previewEnabled && (call || account)
|
property var peerAddressObj: previewEnabled && (call || account)
|
||||||
|
|
@ -34,6 +35,9 @@ Item {
|
||||||
property bool videoEnabled: (previewEnabled && call && call.core.localVideoEnabled)
|
property bool videoEnabled: (previewEnabled && call && call.core.localVideoEnabled)
|
||||||
|| (participantDevice && participantDevice.core.videoEnabled)
|
|| (participantDevice && participantDevice.core.videoEnabled)
|
||||||
property string qmlName
|
property string qmlName
|
||||||
|
property bool displayAll : !!mainItem.call
|
||||||
|
property bool bigBottomAddress: displayAll
|
||||||
|
property bool mutedStatus: participantDevice ? participantDevice.core.isMuted : false
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: background
|
id: background
|
||||||
|
|
@ -42,22 +46,27 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
border.color: DefaultStyle.main2_200
|
border.color: DefaultStyle.main2_200
|
||||||
border.width: mainItem.displayBorder ? 3 * DefaultStyle.dp : 0
|
border.width: mainItem.displayBorder ? 3 * DefaultStyle.dp : 0
|
||||||
|
property int minSize: Math.min(height, width)
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: noCameraLayout
|
id: noCameraLayout
|
||||||
anchors.centerIn: parent
|
anchors.fill: parent
|
||||||
spacing: 0
|
spacing: 0
|
||||||
visible: !cameraLoader.active || cameraLoader.status != Loader.Ready || !cameraLoader.item.isReady
|
visible: !cameraLoader.active || cameraLoader.status != Loader.Ready || !cameraLoader.item.isReady
|
||||||
Avatar{
|
Avatar{
|
||||||
|
id: avatar
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
height: 100
|
// minSize = 372 => avatar = 142
|
||||||
width: height
|
Layout.preferredHeight: background.minSize * 142 / 372
|
||||||
|
Layout.preferredWidth: height
|
||||||
account: mainItem.account
|
account: mainItem.account
|
||||||
call: !mainItem.previewEnabled ? mainItem.call : null
|
call: !mainItem.previewEnabled ? mainItem.call : null
|
||||||
|
address: mainItem.peerAddress
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 15 * DefaultStyle.dp
|
Layout.topMargin: 15 * DefaultStyle.dp
|
||||||
visible: mainItem.call && mainItem.call != undefined
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
visible: mainItem.displayAll
|
||||||
text: mainItem.peerAddress
|
text: mainItem.peerAddress
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
|
|
@ -67,8 +76,9 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.fillWidth: true
|
||||||
visible: mainItem.call && mainItem.call != undefined
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
visible: mainItem.displayAll
|
||||||
text: mainItem.call && mainItem.call.core.peerAddress
|
text: mainItem.call && mainItem.call.core.peerAddress
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
|
|
@ -141,7 +151,7 @@ Item {
|
||||||
: ""
|
: ""
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font {
|
font {
|
||||||
pixelSize: 14 * DefaultStyle.dp
|
pixelSize: (mainItem.bigBottomAddress ? 14 : 10) * DefaultStyle.dp
|
||||||
weight: 500 * DefaultStyle.dp
|
weight: 500 * DefaultStyle.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -155,4 +165,25 @@ Item {
|
||||||
shadowBlur: 1
|
shadowBlur: 1
|
||||||
shadowOpacity: 0.4
|
shadowOpacity: 0.4
|
||||||
}
|
}
|
||||||
|
RowLayout{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.rightMargin: 8 * DefaultStyle.dp
|
||||||
|
anchors.topMargin: 8 * DefaultStyle.dp
|
||||||
|
|
||||||
|
height: 18 * DefaultStyle.dp
|
||||||
|
spacing: 0
|
||||||
|
CheckableButton {
|
||||||
|
id: muteIcon
|
||||||
|
icon.source: AppIcons.microphoneSlash
|
||||||
|
Layout.preferredWidth: 18 * DefaultStyle.dp
|
||||||
|
Layout.preferredHeight: 18 * DefaultStyle.dp
|
||||||
|
visible: mainItem.mutedStatus
|
||||||
|
icon.width: 13 * DefaultStyle.dp
|
||||||
|
icon.height: 13 * DefaultStyle.dp
|
||||||
|
enabled: false
|
||||||
|
contentImageColor: DefaultStyle.main2_500main
|
||||||
|
backgroundColor: DefaultStyle.grey_0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ Item{
|
||||||
property var address: participantDevice && participantDevice.core.address
|
property var address: participantDevice && participantDevice.core.address
|
||||||
videoEnabled: (participantDevice && participantDevice.core.videoEnabled) || (!participantDevice && call && call.core.remoteVideoEnabled)
|
videoEnabled: (participantDevice && participantDevice.core.videoEnabled) || (!participantDevice && call && call.core.remoteVideoEnabled)
|
||||||
qmlName: 'AS'
|
qmlName: 'AS'
|
||||||
|
displayPresence: false
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: waitingTimer
|
id: waitingTimer
|
||||||
|
|
@ -104,6 +105,8 @@ Item{
|
||||||
qmlName: 'S_'+index
|
qmlName: 'S_'+index
|
||||||
visible: parent.visible
|
visible: parent.visible
|
||||||
participantDevice: $modelData
|
participantDevice: $modelData
|
||||||
|
displayAll: false
|
||||||
|
displayPresence: false
|
||||||
Component.onCompleted: console.log(qmlName + " is " +($modelData ? $modelData.core.address : "-"))
|
Component.onCompleted: console.log(qmlName + " is " +($modelData ? $modelData.core.address : "-"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -127,6 +130,8 @@ Item{
|
||||||
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||||
account: accountProxy.defaultAccount
|
account: accountProxy.defaultAccount
|
||||||
call: mainItem.call
|
call: mainItem.call
|
||||||
|
displayAll: false
|
||||||
|
displayPresence: false
|
||||||
|
|
||||||
MovableMouseArea {
|
MovableMouseArea {
|
||||||
id: previewMouseArea
|
id: previewMouseArea
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ Mosaic {
|
||||||
qmlName: "G"
|
qmlName: "G"
|
||||||
Component.onCompleted: console.log("Loaded : " +allDevices + " = " +allDevices.count)
|
Component.onCompleted: console.log("Loaded : " +allDevices + " = " +allDevices.count)
|
||||||
}
|
}
|
||||||
|
property AccountProxy accounts: AccountProxy{id: accountProxy}
|
||||||
model: grid.call.core.isConference ? participantDevices: [0,1]
|
model: grid.call.core.isConference ? participantDevices: [0,1]
|
||||||
delegate: Item{
|
delegate: Item{
|
||||||
id: avatarCell
|
id: avatarCell
|
||||||
|
|
@ -39,6 +40,10 @@ Mosaic {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
qmlName: 'G_'+index
|
qmlName: 'G_'+index
|
||||||
call: !grid.call.core.isConference ? grid.call : null
|
call: !grid.call.core.isConference ? grid.call : null
|
||||||
|
account: index == 0 ? accountProxy.defaultAccount : null
|
||||||
|
displayAll: false
|
||||||
|
bigBottomAddress: true
|
||||||
|
displayPresence: false
|
||||||
|
|
||||||
participantDevice: avatarCell.currentDevice
|
participantDevice: avatarCell.currentDevice
|
||||||
Component.onCompleted: console.log(qmlName + " is " +(call ? call.core.peerAddress : currentDevice ? currentDevice.core.address : 'addr_NotDefined'))
|
Component.onCompleted: console.log(qmlName + " is " +(call ? call.core.peerAddress : currentDevice ? currentDevice.core.address : 'addr_NotDefined'))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue