Skip to content
Snippets Groups Projects
Commit 7059a8cd authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

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
parent abde3cba
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,8 @@ Rectangle { ...@@ -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 { ...@@ -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 { ...@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment