mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: popupwindow misjudgment
content should not more width than screen otherwise popupwindows must be out of bounds screen log: as title
This commit is contained in:
parent
79cab3fac8
commit
83f264720c
@ -136,7 +136,7 @@ void DockPopupWindow::show(const int x, const int y)
|
|||||||
if (!screen)
|
if (!screen)
|
||||||
return;
|
return;
|
||||||
QRect screenRect = screen->geometry();
|
QRect screenRect = screen->geometry();
|
||||||
if (getContent()->width() > screenRect.width()) {
|
if (getContent()->width() <= screenRect.width()) {
|
||||||
displayPoint.setX(qMax(screenRect.x(), displayPoint.x()));
|
displayPoint.setX(qMax(screenRect.x(), displayPoint.x()));
|
||||||
displayPoint.setX(qMin(screenRect.x() + screenRect.width() - getContent()->width(), displayPoint.x()));
|
displayPoint.setX(qMin(screenRect.x() + screenRect.width() - getContent()->width(), displayPoint.x()));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user