Skip to content
Snippets Groups Projects
Commit 59c8eadb authored by Sébastien Blin's avatar Sébastien Blin
Browse files

recordbox: move to correct position

Change-Id: Ic5bad27e2d20f6c84b1defe4c37c0328000bb1af
Gitlab: #26
parent 5749e48c
No related branches found
No related tags found
No related merge requests found
...@@ -592,21 +592,29 @@ Window { ...@@ -592,21 +592,29 @@ Window {
&& mainViewStack.visible) { && mainViewStack.visible) {
mainViewStack.pop() mainViewStack.pop()
} }
recordBox.visible = false
} }
Component.onCompleted: { Component.onCompleted: {
sidePanelViewStack.SplitView.maximumWidth = Qt.binding(function() { sidePanelViewStack.SplitView.maximumWidth = Qt.binding(function() {
return (hiddenView ? splitView.width : splitView.width - sidePanelViewStackPreferedWidth) return (hiddenView ? splitView.width :
splitView.width - sidePanelViewStackPreferedWidth)
}) })
recordBox.x = Qt.binding(function() { recordBox.x = Qt.binding(function() {
var i = (welcomeViewStack.width > 1000 ? Math.round((welcomeViewStack.width-1000)*0.5) : 0) var i = ((mainViewStack.visible && mainViewStack.width > 1000) ?
return sidePanelViewStack.width + recordBox.x_offset + i Math.round((mainViewStack.width-1000)*0.5) :
0)
return mainViewStack.visible ?
sidePanelViewStack.width + recordBox.x_offset + i :
recordBox.x_offset + i
}) })
recordBox.y = Qt.binding(function() { recordBox.y = Qt.binding(function() {
return sidePanelViewStack.height + recordBox.y_offset return mainViewStack.visible ? mainViewStack.height + recordBox.y_offset :
sidePanelViewStack.height + recordBox.y_offset
}) })
...@@ -681,17 +689,6 @@ Window { ...@@ -681,17 +689,6 @@ Window {
RecordBox{ RecordBox{
id: recordBox id: recordBox
visible: false visible: false
Component.onCompleted: {
recordBox.x = Qt.binding(function() {
var i = (mainViewStack.width > 1000 ? Math.round((mainViewStack.width-1000)*0.5) : 0)
return sidePanelViewStack.width + recordBox.x_offset + i
})
recordBox.y = Qt.binding(function() {
return mainViewStack.height + recordBox.y_offset
})
}
} }
UserProfile { UserProfile {
......
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