table width bugfix
This commit is contained in:
parent
579628b4c4
commit
7553251baf
1 changed files with 7 additions and 1 deletions
|
@ -1002,7 +1002,10 @@ void Player::actMoveToExile(CardItem *card)
|
||||||
|
|
||||||
qreal Player::getMinimumWidth() const
|
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)
|
void Player::setMirrored(bool _mirrored)
|
||||||
|
@ -1019,6 +1022,9 @@ void Player::processSceneSizeChange(const QSizeF &newSize)
|
||||||
qreal fullPlayerWidth = newSize.width();
|
qreal fullPlayerWidth = newSize.width();
|
||||||
|
|
||||||
qreal tableWidth = fullPlayerWidth - CARD_WIDTH - 5 - counterAreaWidth;
|
qreal tableWidth = fullPlayerWidth - CARD_WIDTH - 5 - counterAreaWidth;
|
||||||
|
if (!settingsCache->getHorizontalHand())
|
||||||
|
tableWidth -= hand->boundingRect().width();
|
||||||
|
|
||||||
table->setWidth(tableWidth);
|
table->setWidth(tableWidth);
|
||||||
hand->setWidth(tableWidth);
|
hand->setWidth(tableWidth);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue