mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-06 07:45:51 +02:00
callview: adjust the preview positioning
- move default preview position to top right - avoid coliding with the new call action bar Gitlab: #411 Change-Id: Iaa77315be4f6dab28e3161d7dd9b3516c00e4e68
This commit is contained in:
parent
abde3cbac0
commit
7059a8cdab
1 changed files with 7 additions and 6 deletions
|
@ -38,7 +38,8 @@ Rectangle {
|
||||||
property string bestId: "Best Id"
|
property string bestId: "Best Id"
|
||||||
property variant clickPos: "1,1"
|
property variant clickPos: "1,1"
|
||||||
property int previewMargin: 15
|
property int previewMargin: 15
|
||||||
property int previewMarginY: previewMargin + 56
|
property int previewMarginYTop: previewMargin + 42
|
||||||
|
property int previewMarginYBottom: previewMargin + 84
|
||||||
property int previewToX: 0
|
property int previewToX: 0
|
||||||
property int previewToY: 0
|
property int previewToY: 0
|
||||||
property bool isAudioOnly: false
|
property bool isAudioOnly: false
|
||||||
|
@ -116,26 +117,26 @@ Rectangle {
|
||||||
return callPageMainRect.width - previewRenderer.width - previewMargin
|
return callPageMainRect.width - previewRenderer.width - previewMargin
|
||||||
})
|
})
|
||||||
previewToY = Qt.binding(function () {
|
previewToY = Qt.binding(function () {
|
||||||
return callPageMainRect.height - previewRenderer.height - previewMarginY
|
return callPageMainRect.height - previewRenderer.height - previewMarginYBottom
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// Top right.
|
// Top right.
|
||||||
previewToX = Qt.binding(function () {
|
previewToX = Qt.binding(function () {
|
||||||
return callPageMainRect.width - previewRenderer.width - previewMargin
|
return callPageMainRect.width - previewRenderer.width - previewMargin
|
||||||
})
|
})
|
||||||
previewToY = previewMarginY
|
previewToY = previewMarginYTop
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (previewRendererCenter.y >= distantRendererCenter.y) {
|
if (previewRendererCenter.y >= distantRendererCenter.y) {
|
||||||
// Bottom left.
|
// Bottom left.
|
||||||
previewToX = previewMargin
|
previewToX = previewMargin
|
||||||
previewToY = Qt.binding(function () {
|
previewToY = Qt.binding(function () {
|
||||||
return callPageMainRect.height - previewRenderer.height - previewMarginY
|
return callPageMainRect.height - previewRenderer.height - previewMarginYBottom
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// Top left.
|
// Top left.
|
||||||
previewToX = previewMargin
|
previewToX = previewMargin
|
||||||
previewToY = previewMarginY
|
previewToY = previewMarginYTop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
previewRenderer.state = "geoChanging"
|
previewRenderer.state = "geoChanging"
|
||||||
|
@ -219,7 +220,7 @@ Rectangle {
|
||||||
|
|
||||||
width: Math.max(callPageMainRect.width / 5, JamiTheme.minimumPreviewWidth)
|
width: Math.max(callPageMainRect.width / 5, JamiTheme.minimumPreviewWidth)
|
||||||
x: callPageMainRect.width - previewRenderer.width - previewMargin
|
x: callPageMainRect.width - previewRenderer.width - previewMargin
|
||||||
y: callPageMainRect.height - previewRenderer.height - previewMargin - 56 // Avoid overlay
|
y: previewMarginYTop
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
|
|
Loading…
Add table
Reference in a new issue