mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 10:33:54 -07:00
fixed player area layout
This commit is contained in:
parent
7bff204461
commit
2451c39ef2
7 changed files with 41 additions and 27 deletions
|
|
@ -17,7 +17,7 @@ PlayerTarget::PlayerTarget(Player *_owner)
|
|||
|
||||
QRectF PlayerTarget::boundingRect() const
|
||||
{
|
||||
return QRectF(0, 0, 64, 64);
|
||||
return QRectF(0, 0, 100, 64);
|
||||
}
|
||||
|
||||
void PlayerTarget::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
|
||||
|
|
@ -41,7 +41,10 @@ void PlayerTarget::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*o
|
|||
QPixmapCache::insert(cacheKey, cachedPixmap);
|
||||
}
|
||||
painter->resetTransform();
|
||||
|
||||
painter->translate((translatedSize.width() - cachedPixmap.width()) / 2.0, 0);
|
||||
painter->drawPixmap(cachedPixmap.rect(), cachedPixmap, cachedPixmap.rect());
|
||||
painter->resetTransform();
|
||||
|
||||
QString name = info->getName();
|
||||
if (name.size() > 13)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue