tests: Fix constraint region in pointerconstraints example

This commit is contained in:
Vlad Zahorodnii 2024-01-23 13:47:05 +02:00
parent a1b47dfa08
commit e01116149b

View file

@ -167,8 +167,8 @@ ColumnLayout {
enabled: root.waylandNative && !fullWindowChck.checked enabled: root.waylandNative && !fullWindowChck.checked
function rect() { function rect() {
var globalPt = mapToGlobal(x, y); const scenePosition = mapToItem(null, x, y);
return Qt.rect(globalPt.x, globalPt.y, width, height); return Qt.rect(scenePosition.x, scenePosition.y, width, height);
} }
border.color: enabled ? "black" : "lightgrey" border.color: enabled ? "black" : "lightgrey"