mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-15 14:47:18 +02:00
Fix laser intersection with HUD overlay dialogs
Also fixes dialog resize outline being drawn in the wrong position (desktop and HMD).
This commit is contained in:
parent
2cfd2c8d32
commit
b865e9bc8c
2 changed files with 3 additions and 4 deletions
|
@ -309,8 +309,8 @@ FocusScope {
|
||||||
if (child.hasOwnProperty("modality")) {
|
if (child.hasOwnProperty("modality")) {
|
||||||
var mappedPoint = mapToItem(child, point.x, point.y);
|
var mappedPoint = mapToItem(child, point.x, point.y);
|
||||||
if (child.hasOwnProperty("frame")) {
|
if (child.hasOwnProperty("frame")) {
|
||||||
var outLine = child.frame.children[2];
|
var outLine = child.frame.children[2]; // sizeOutline
|
||||||
var framePoint = outLine.mapFromGlobal(point.x, point.y);
|
var framePoint = mapToItem(outLine, point.x, point.y);
|
||||||
if (outLine.contains(framePoint)) {
|
if (outLine.contains(framePoint)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ Item {
|
||||||
readonly property int frameMarginRight: frame.decoration ? frame.decoration.frameMarginRight : 0
|
readonly property int frameMarginRight: frame.decoration ? frame.decoration.frameMarginRight : 0
|
||||||
readonly property int frameMarginTop: frame.decoration ? frame.decoration.frameMarginTop : 0
|
readonly property int frameMarginTop: frame.decoration ? frame.decoration.frameMarginTop : 0
|
||||||
readonly property int frameMarginBottom: frame.decoration ? frame.decoration.frameMarginBottom : 0
|
readonly property int frameMarginBottom: frame.decoration ? frame.decoration.frameMarginBottom : 0
|
||||||
readonly property int offsetCorrection: 20
|
|
||||||
|
|
||||||
// Frames always fill their parents, but their decorations may extend
|
// Frames always fill their parents, but their decorations may extend
|
||||||
// beyond the window via negative margin sizes
|
// beyond the window via negative margin sizes
|
||||||
|
@ -76,7 +75,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: sizeOutline
|
id: sizeOutline
|
||||||
x: -frameMarginLeft
|
x: -frameMarginLeft
|
||||||
y: -frameMarginTop - offsetCorrection
|
y: -frameMarginTop
|
||||||
width: window ? window.width + frameMarginLeft + frameMarginRight + 2 : 0
|
width: window ? window.width + frameMarginLeft + frameMarginRight + 2 : 0
|
||||||
height: window ? window.height + frameMarginTop + frameMarginBottom + 2 : 0
|
height: window ? window.height + frameMarginTop + frameMarginBottom + 2 : 0
|
||||||
color: hifi.colors.baseGrayHighlight15
|
color: hifi.colors.baseGrayHighlight15
|
||||||
|
|
Loading…
Reference in a new issue