mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
conference: fix show minimize button
Change-Id: I104215284272b4d1fdec38b6d715f92184b3c711 GitLab: #367
This commit is contained in:
parent
3f476205fa
commit
197fd62f94
2 changed files with 6 additions and 14 deletions
|
@ -87,12 +87,6 @@ Rectangle {
|
|||
|| pH < (distantRenderer.height - distantRenderer.getYOffset() * 2 - 1))
|
||||
}
|
||||
|
||||
// returns true if participant takes renderer's width
|
||||
function showMinimize(pX, pW) {
|
||||
return (pX - distantRenderer.getXOffset() === 0
|
||||
&& pW >= distantRenderer.width - distantRenderer.getXOffset() * 2 - 1)
|
||||
}
|
||||
|
||||
function handleParticipantsInfo(infos) {
|
||||
// TODO: in the future the conference layout should be entirely managed by the client
|
||||
// Hack: truncate and ceil participant's overlay position and size to correct
|
||||
|
@ -132,11 +126,9 @@ Rectangle {
|
|||
participantOverlays[p].y,
|
||||
participantOverlays[p].width,
|
||||
participantOverlays[p].height)
|
||||
showMin = showMinimize(participantOverlays[p].x,
|
||||
participantOverlays[p].width)
|
||||
|
||||
participantOverlays[p].setMenu(participant.uri, participant.bestName,
|
||||
participant.isLocal, showMax, showMin)
|
||||
participant.isLocal, participant.active, showMax)
|
||||
if (participant.videoMuted)
|
||||
participantOverlays[p].setAvatar(participant.avatar)
|
||||
else
|
||||
|
@ -177,10 +169,9 @@ Rectangle {
|
|||
}
|
||||
|
||||
showMax = showMaximize(hover.x, hover.y, hover.width, hover.height)
|
||||
showMin = showMinimize(hover.x, hover.width)
|
||||
|
||||
hover.setMenu(infos[infoVariant].uri, infos[infoVariant].bestName,
|
||||
infos[infoVariant].isLocal, showMax, showMin)
|
||||
infos[infoVariant].isLocal, infos[infoVariant].active, showMax)
|
||||
if (infos[infoVariant].videoMuted)
|
||||
hover.setAvatar(infos[infoVariant].avatar)
|
||||
else
|
||||
|
|
|
@ -42,10 +42,10 @@ Rectangle {
|
|||
arg(shapeWidth)
|
||||
|
||||
property string uri: overlayMenu.uri
|
||||
property bool participantIsActive: false
|
||||
property bool participantIsHost: false
|
||||
property bool participantIsModerator: false
|
||||
property bool participantIsMuted: false
|
||||
property bool participantIsLocalMuted: false
|
||||
property bool participantIsModeratorMuted: false
|
||||
|
||||
property bool participantMenuActive: false
|
||||
|
@ -59,7 +59,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
function setMenu(newUri, bestName, isLocal, showMax, showMin) {
|
||||
function setMenu(newUri, bestName, isLocal, isActive, showMax) {
|
||||
|
||||
overlayMenu.uri = newUri
|
||||
overlayMenu.bestName = bestName
|
||||
|
@ -68,6 +68,7 @@ Rectangle {
|
|||
var isModerator = CallAdapter.isCurrentModerator()
|
||||
participantIsHost = CallAdapter.participantIsHost(overlayMenu.uri)
|
||||
participantIsModerator = CallAdapter.isModerator(overlayMenu.uri)
|
||||
participantIsActive = isActive
|
||||
overlayMenu.showSetModerator = isHost && !isLocal && !participantIsModerator
|
||||
overlayMenu.showUnsetModerator = isHost && !isLocal && participantIsModerator
|
||||
|
||||
|
@ -82,7 +83,7 @@ Rectangle {
|
|||
overlayMenu.showModeratorMute = isModerator && !isModeratorMuted
|
||||
overlayMenu.showModeratorUnmute = isModerator && isModeratorMuted
|
||||
overlayMenu.showMaximize = isModerator && showMax
|
||||
overlayMenu.showMinimize = isModerator && showMin
|
||||
overlayMenu.showMinimize = isModerator && participantIsActive
|
||||
overlayMenu.showHangup = isModerator && !isLocal && !participantIsHost
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue