Incorporate outfoxxed feedback

This commit is contained in:
David Heinemeier Hansson
2026-05-16 13:28:37 +02:00
parent 122adc6bb9
commit 3eda4948b2
4 changed files with 255 additions and 183 deletions
@@ -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