mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
fixed CardInfoWidget weirdness
This commit is contained in:
parent
7cd4cef9d3
commit
caf39bc7d3
1 changed files with 1 additions and 1 deletions
|
|
@ -786,11 +786,11 @@ void TabGame::showCardInfoPopup(const QPoint &pos, const QString &cardName)
|
||||||
infoPopup->setAttribute(Qt::WA_TransparentForMouseEvents);
|
infoPopup->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
infoPopup->setCard(cardName);
|
infoPopup->setCard(cardName);
|
||||||
QRect screenRect = qApp->desktop()->screenGeometry(this);
|
QRect screenRect = qApp->desktop()->screenGeometry(this);
|
||||||
infoPopup->show();
|
|
||||||
infoPopup->move(
|
infoPopup->move(
|
||||||
qMax(screenRect.left(), qMin(pos.x() - infoPopup->width() / 2, screenRect.left() + screenRect.width() - infoPopup->width())),
|
qMax(screenRect.left(), qMin(pos.x() - infoPopup->width() / 2, screenRect.left() + screenRect.width() - infoPopup->width())),
|
||||||
qMax(screenRect.top(), qMin(pos.y() - infoPopup->height() / 2, screenRect.top() + screenRect.height() - infoPopup->height()))
|
qMax(screenRect.top(), qMin(pos.y() - infoPopup->height() / 2, screenRect.top() + screenRect.height() - infoPopup->height()))
|
||||||
);
|
);
|
||||||
|
infoPopup->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabGame::deleteCardInfoPopup()
|
void TabGame::deleteCardInfoPopup()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue