From 83f264720cbc63d89f3cd1b39cf0a521f065023e Mon Sep 17 00:00:00 2001 From: tsic404 Date: Thu, 11 May 2023 13:24:05 +0800 Subject: [PATCH] fix: popupwindow misjudgment content should not more width than screen otherwise popupwindows must be out of bounds screen log: as title --- frame/util/dockpopupwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/util/dockpopupwindow.cpp b/frame/util/dockpopupwindow.cpp index ca10d6f19..0f40246a4 100644 --- a/frame/util/dockpopupwindow.cpp +++ b/frame/util/dockpopupwindow.cpp @@ -136,7 +136,7 @@ void DockPopupWindow::show(const int x, const int y) if (!screen) return; QRect screenRect = screen->geometry(); - if (getContent()->width() > screenRect.width()) { + if (getContent()->width() <= screenRect.width()) { displayPoint.setX(qMax(screenRect.x(), displayPoint.x())); displayPoint.setX(qMin(screenRect.x() + screenRect.width() - getContent()->width(), displayPoint.x())); }