From 7553251baff5ab3e5d1e3f0afa79e7ef55cfe5fd Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Tue, 8 Jun 2010 16:39:35 +0200 Subject: [PATCH] table width bugfix --- cockatrice/src/player.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index eac9c8b43..eb7dd0390 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -1002,7 +1002,10 @@ void Player::actMoveToExile(CardItem *card) qreal Player::getMinimumWidth() const { - return table->getMinimumWidth() + CARD_WIDTH + 5 + counterAreaWidth; + qreal result = table->getMinimumWidth() + CARD_WIDTH + 5 + counterAreaWidth; + if (!settingsCache->getHorizontalHand()) + result += hand->boundingRect().width(); + return result; } void Player::setMirrored(bool _mirrored) @@ -1019,6 +1022,9 @@ void Player::processSceneSizeChange(const QSizeF &newSize) qreal fullPlayerWidth = newSize.width(); qreal tableWidth = fullPlayerWidth - CARD_WIDTH - 5 - counterAreaWidth; + if (!settingsCache->getHorizontalHand()) + tableWidth -= hand->boundingRect().width(); + table->setWidth(tableWidth); hand->setWidth(tableWidth); }