Fix tooltip & popup positioning (#4740)
* Fix tooltip & popup positioning This tries to ensure the tooltip & popups are created on the correct monitor * Add changelog entry * Clean up debug output * Use the full frame geometry to figure out screen bound movements * Remove the now-unused `setStayInScreenRect` function * Change the UserInfoPopup offset to be based on its width & height instead * Remove more debug output
This commit is contained in:
@@ -1810,7 +1810,8 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
tooltipWidget->moveTo(this, event->globalPos());
|
||||
tooltipWidget->moveTo(event->globalPos(), true,
|
||||
BaseWindow::BoundsChecker::CursorPosition);
|
||||
tooltipWidget->setWordWrap(isLinkValid);
|
||||
tooltipWidget->show();
|
||||
}
|
||||
@@ -2663,8 +2664,9 @@ void ChannelView::showUserInfoPopup(const QString &userName,
|
||||
: this->underlyingChannel_;
|
||||
userPopup->setData(userName, contextChannel, openingChannel);
|
||||
|
||||
QPoint offset(int(150 * this->scale()), int(70 * this->scale()));
|
||||
userPopup->move(QCursor::pos() - offset);
|
||||
QPoint offset(userPopup->width() / 3, userPopup->height() / 5);
|
||||
userPopup->moveTo(QCursor::pos() - offset, false,
|
||||
BaseWindow::BoundsChecker::CursorPosition);
|
||||
userPopup->show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user