mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
opening user info popup approx. at the center of the mouse
This commit is contained in:
parent
b2be44bbe7
commit
7e53b44099
|
@ -1149,10 +1149,12 @@ void ChannelView::handleLinkClick(QMouseEvent *event, const messages::Link &link
|
|||
switch (link.type) {
|
||||
case messages::Link::UserInfo: {
|
||||
auto user = link.value;
|
||||
|
||||
auto *userPopup = new UserInfoPopup;
|
||||
userPopup->setData(user, this->channel_);
|
||||
userPopup->setAttribute(Qt::WA_DeleteOnClose);
|
||||
userPopup->move(event->globalPos());
|
||||
userPopup->move(QCursor::pos() -
|
||||
QPoint(int(150 * this->getScale()), int(70 * this->getScale())));
|
||||
userPopup->show();
|
||||
|
||||
// this->userPopupWidget.setName(user);
|
||||
|
|
|
@ -506,7 +506,8 @@ void Split::doOpenUserInfoPopup(const QString &user)
|
|||
auto *userPopup = new UserInfoPopup;
|
||||
userPopup->setData(user, this->getChannel());
|
||||
userPopup->setAttribute(Qt::WA_DeleteOnClose);
|
||||
userPopup->move(QCursor::pos());
|
||||
userPopup->move(QCursor::pos() -
|
||||
QPoint(int(150 * this->getScale()), int(70 * this->getScale())));
|
||||
userPopup->show();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue