From 579d589290f1aa330ea1087da08c13baaff1e415 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 18 Jun 2025 13:41:14 -0700 Subject: [PATCH] core/popupanchor: ensure item-derived rect is at least 1x1 pixels --- src/core/popupanchor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/popupanchor.cpp b/src/core/popupanchor.cpp index a1ada033..bbcc3a5f 100644 --- a/src/core/popupanchor.cpp +++ b/src/core/popupanchor.cpp @@ -189,11 +189,15 @@ void PopupAnchor::updateAnchor() { if (this->mItem && this->mProxyWindow) { auto baseRect = this->mUserRect.isEmpty() ? this->mItem->boundingRect() : this->mUserRect.qrect(); + auto rect = this->mProxyWindow->contentItem()->mapFromItem( this->mItem, baseRect.marginsRemoved(this->mMargins.qmargins()) ); + if (rect.width() < 1) rect.setWidth(1); + if (rect.height() < 1) rect.setHeight(1); + this->setWindowRect(rect.toRect()); }