small bugfix
This commit is contained in:
parent
33ccbe3c00
commit
50ae90c148
2 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ void Counter::setValue(int _value)
|
||||||
void Counter::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
void Counter::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (event->button() == Qt::LeftButton) {
|
if (event->button() == Qt::LeftButton) {
|
||||||
player->client->incCounter(id, -1);
|
player->client->incCounter(id, 1);
|
||||||
event->accept();
|
event->accept();
|
||||||
} else if (event->button() == Qt::RightButton) {
|
} else if (event->button() == Qt::RightButton) {
|
||||||
menu->exec(event->screenPos());
|
menu->exec(event->screenPos());
|
||||||
|
|
|
@ -188,7 +188,7 @@ Player::~Player()
|
||||||
|
|
||||||
void Player::updateBoundingRect()
|
void Player::updateBoundingRect()
|
||||||
{
|
{
|
||||||
bRect = QRectF(0, 0, CARD_WIDTH + 60 + hand->boundingRect().width() + table->boundingRect().width(), table->boundingRect().height());
|
bRect = QRectF(0, 0, CARD_WIDTH + 5 + counterAreaWidth + hand->boundingRect().width() + table->boundingRect().width(), table->boundingRect().height());
|
||||||
emit sizeChanged();
|
emit sizeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,7 +574,7 @@ void Player::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/
|
||||||
font.setPixelSize(20);
|
font.setPixelSize(20);
|
||||||
// font.setWeight(QFont::Bold);
|
// font.setWeight(QFont::Bold);
|
||||||
|
|
||||||
int totalWidth = CARD_WIDTH + 60;
|
int totalWidth = CARD_WIDTH + counterAreaWidth + 5;
|
||||||
|
|
||||||
if (getActive()) {
|
if (getActive()) {
|
||||||
QFontMetrics fm(font);
|
QFontMetrics fm(font);
|
||||||
|
|
Loading…
Reference in a new issue