From 23593ec0cea033feb405e10089d2c6c2ba3cfadb Mon Sep 17 00:00:00 2001 From: Riccardo Campo Date: Sat, 8 Aug 2026 14:21:03 +0200 Subject: [PATCH] Fix popupview top and bottom overflow --- .../uicomponents/qml/Muse/UiComponents/popupview.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/framework/uicomponents/qml/Muse/UiComponents/popupview.cpp b/framework/uicomponents/qml/Muse/UiComponents/popupview.cpp index 5ef377afbc..c5df1aa7e2 100644 --- a/framework/uicomponents/qml/Muse/UiComponents/popupview.cpp +++ b/framework/uicomponents/qml/Muse/UiComponents/popupview.cpp @@ -424,6 +424,16 @@ void PopupView::updateGeometry() movePos(m_globalPos.x() - (viewRect.right() - anchorRect.right()), m_globalPos.y()); } + if (viewRect.bottom() > anchorRect.bottom()) { + // move to the top to an area that doesn't fit + movePos(m_globalPos.x(), m_globalPos.y() + anchorRect.bottom() - viewRect.bottom()); + } + + if (viewRect.top() < anchorRect.top()) { + // move to the bottom to an area that doesn't fit + movePos(m_globalPos.x(), m_globalPos.y() - (viewRect.top() - anchorRect.top())); + } + if (!showArrow()) { if (popupPosition() == PopupPosition::Bottom || popupPosition() == PopupPosition::Top) { movePos(m_globalPos.x() - padding(), m_globalPos.y());