hide horizontal hand of non-local players
This commit is contained in:
parent
a67883ca64
commit
f7963e713b
1 changed files with 17 additions and 6 deletions
|
@ -313,8 +313,12 @@ void Player::rearrangeZones()
|
||||||
|
|
||||||
if (settingsCache->getHorizontalHand()) {
|
if (settingsCache->getHorizontalHand()) {
|
||||||
if (mirrored) {
|
if (mirrored) {
|
||||||
hand->setPos(base);
|
if (hand->contentsKnown()) {
|
||||||
base += QPointF(0, hand->boundingRect().height());
|
hand->setVisible(true);
|
||||||
|
hand->setPos(base);
|
||||||
|
base += QPointF(0, hand->boundingRect().height());
|
||||||
|
} else
|
||||||
|
hand->setVisible(false);
|
||||||
|
|
||||||
stack->setPos(base);
|
stack->setPos(base);
|
||||||
base += QPointF(stack->boundingRect().width(), 0);
|
base += QPointF(stack->boundingRect().width(), 0);
|
||||||
|
@ -326,10 +330,16 @@ void Player::rearrangeZones()
|
||||||
table->setPos(base.x() + stack->boundingRect().width(), 0);
|
table->setPos(base.x() + stack->boundingRect().width(), 0);
|
||||||
base += QPointF(0, table->boundingRect().height());
|
base += QPointF(0, table->boundingRect().height());
|
||||||
|
|
||||||
hand->setPos(base);
|
if (hand->contentsKnown()) {
|
||||||
|
hand->setVisible(true);
|
||||||
|
hand->setPos(base);
|
||||||
|
} else
|
||||||
|
hand->setVisible(false);
|
||||||
}
|
}
|
||||||
hand->setWidth(table->getWidth() + stack->boundingRect().width());
|
hand->setWidth(table->getWidth() + stack->boundingRect().width());
|
||||||
} else {
|
} else {
|
||||||
|
hand->setVisible(true);
|
||||||
|
|
||||||
hand->setPos(base);
|
hand->setPos(base);
|
||||||
base += QPointF(hand->boundingRect().width(), 0);
|
base += QPointF(hand->boundingRect().width(), 0);
|
||||||
|
|
||||||
|
@ -358,9 +368,10 @@ void Player::updateBoundingRect()
|
||||||
{
|
{
|
||||||
prepareGeometryChange();
|
prepareGeometryChange();
|
||||||
qreal width = CARD_HEIGHT + 5 + counterAreaWidth + stack->boundingRect().width();
|
qreal width = CARD_HEIGHT + 5 + counterAreaWidth + stack->boundingRect().width();
|
||||||
if (settingsCache->getHorizontalHand())
|
if (settingsCache->getHorizontalHand()) {
|
||||||
bRect = QRectF(0, 0, width + table->boundingRect().width(), table->boundingRect().height() + hand->boundingRect().height());
|
qreal handHeight = hand->isVisible() ? hand->boundingRect().height() : 0;
|
||||||
else
|
bRect = QRectF(0, 0, width + table->boundingRect().width(), table->boundingRect().height() + handHeight);
|
||||||
|
} else
|
||||||
bRect = QRectF(0, 0, width + hand->boundingRect().width() + table->boundingRect().width(), table->boundingRect().height());
|
bRect = QRectF(0, 0, width + hand->boundingRect().width() + table->boundingRect().width(), table->boundingRect().height());
|
||||||
emit sizeChanged();
|
emit sizeChanged();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue