Set explicitely parent in MaximizeComponent
Currently it uses applicationWindow().overlay which works but is not ideal for multiple reasons: - This as a tendency to breaks unexpectedly - It can't be optimized by the qml compiler So we are trying to move away from these construct everywhere.
This commit is contained in:
@@ -89,7 +89,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
let map = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(parent, {
|
let map = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(QQC2.Overlay.overlay, {
|
||||||
text: barcode.content,
|
text: barcode.content,
|
||||||
title: root.room ? root.room.displayName : "",
|
title: root.room ? root.room.displayName : "",
|
||||||
subtitle: root.room ? root.room.id : "",
|
subtitle: root.room ? root.room.id : "",
|
||||||
|
|||||||
@@ -309,6 +309,7 @@ Kirigami.Page {
|
|||||||
NeochatMaximizeComponent {
|
NeochatMaximizeComponent {
|
||||||
currentRoom: root.currentRoom
|
currentRoom: root.currentRoom
|
||||||
model: root.mediaMessageFilterModel
|
model: root.mediaMessageFilterModel
|
||||||
|
parent: root.QQC2.Overlay.overlay
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ Kirigami.Dialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
let map = qrMaximizeComponent.createObject(parent, {
|
let map = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(QQC2.Overlay.overlay, {
|
||||||
text: barcode.content,
|
text: barcode.content,
|
||||||
title: root.room ? root.room.member(root.user.id).displayName : root.user.displayName,
|
title: root.room ? root.room.member(root.user.id).displayName : root.user.displayName,
|
||||||
subtitle: root.user.id,
|
subtitle: root.user.id,
|
||||||
@@ -265,8 +265,4 @@ Kirigami.Dialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
|
||||||
id: qrMaximizeComponent
|
|
||||||
QrCodeMaximizeComponent {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user