fix drawing input anchoring incorrectly when using loader

This commit is contained in:
2026-05-27 12:03:06 +02:00
parent 3963a48a9d
commit d92e5b4cd7
4 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -22,20 +22,20 @@ CustomMouseArea {
}
acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill: root.visibilities.isDrawing ? parent : undefined
enabled: z > 0
hoverEnabled: true
visible: root.visibilities.isDrawing
onPositionChanged: event => {
const x = event.x;
const y = event.y;
if (root.visibilities.isDrawing && (event.buttons & Qt.LeftButton)) {
root.drawing.points.push(Qt.point(x, y));
root.drawing.requestPaint();
}
if (root.inLeftPanel(root.popout, x, y)) {
console.log("set -2 z");
root.z = -2;
root.panels.drawing.expanded = true;
}
+1 -1
View File
@@ -78,7 +78,7 @@ CustomMouseArea {
const dragY = y - dragStart.y;
if (root.visibilities.isDrawing && !root.inLeftPanel(root.panels.drawing, x, y)) {
// root.input.z = 2;
root.input.z = 2;
root.panels.drawing.expanded = false;
}
+4 -4
View File
@@ -309,12 +309,11 @@ Variants {
id: drawingLoader
active: visibilities.isDrawing
anchors.fill: parent
z: 2
sourceComponent: Drawing {
id: drawing
anchors.fill: parent
z: 2
}
}
@@ -322,6 +321,8 @@ Variants {
id: inputLoader
active: visibilities.isDrawing
anchors.fill: parent
z: 2
sourceComponent: DrawingInput {
id: input
@@ -331,7 +332,6 @@ Variants {
panels: panels
popout: panels.drawing
visibilities: visibilities
z: 2
}
}
-1
View File
@@ -48,7 +48,6 @@ Item {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
asynchronous: true
height: content.item.height
opacity: root.expanded ? 0 : 1
Behavior on opacity {