Commit 3532efb2 authored by Harald Sitter's avatar Harald Sitter

make needler round x,y,width,height

otherwise the in-openqa area will be pixel rounded whereas our qml version
is fraction precise, which can cause areas to match or not match something
they should
parent 1322516c
......@@ -76,6 +76,7 @@ Rectangle {
} else if (x > image.width) {
x = image.width - minimumOffset
}
x = Math.round(x)
}
onYChanged: {
......@@ -84,12 +85,14 @@ Rectangle {
} else if (y > image.height) {
y = image.height - minimumOffset
}
y = Math.round(y)
}
onWidthChanged: {
if (x + width > image.width) {
width = image.width - x
}
width = Math.round(width)
dimensionHint()
}
......@@ -97,6 +100,7 @@ Rectangle {
if (y + height > image.height) {
height = image.height - y
}
height = Math.round(height)
dimensionHint()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment