Incorporate outfoxxed feedback
This commit is contained in:
@@ -81,6 +81,12 @@ PopupWindow {
|
||||
var window = target.QsWindow.window
|
||||
if (!window) return
|
||||
|
||||
if (root.bar.position === "top" || root.bar.position === "bottom") {
|
||||
localX = Math.max(root.margin, Math.min(localX, window.width - popupWidth - root.margin))
|
||||
} else {
|
||||
localY = Math.max(root.margin, Math.min(localY, window.height - popupHeight - root.margin))
|
||||
}
|
||||
|
||||
var point = window.contentItem.mapFromItem(target, localX, localY)
|
||||
popupAnchor.rect.x = Math.round(point.x)
|
||||
popupAnchor.rect.y = Math.round(point.y)
|
||||
|
||||
@@ -177,6 +177,7 @@ Item {
|
||||
bar: root.bar
|
||||
owner: root
|
||||
open: root.popupOpen
|
||||
margin: 6
|
||||
contentWidth: 320
|
||||
contentHeight: layout.implicitHeight + 28
|
||||
|
||||
|
||||
Reference in New Issue
Block a user