diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp
index c86db229..7980b0b7 100755
--- a/src/gui/qt/gametable/gametableimpl.cpp
+++ b/src/gui/qt/gametable/gametableimpl.cpp
@@ -449,6 +449,7 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
pushButton_showMyCards->hide();
spectatorIcon = new QLabel(this);
+ spectatorNumberLabel = new QLabel(this);
//style Game Table
refreshGameTableStyle();
@@ -3594,6 +3595,7 @@ void gameTableImpl::networkGameModification()
#endif
blinkingStartButtonAnimationTimer->stop();
spectatorIcon->show();
+ spectatorNumberLabel->show();
refreshSpectatorsDisplay();
}
if(myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_NETWORK) {
@@ -3603,6 +3605,7 @@ void gameTableImpl::networkGameModification()
pushButton_break->hide();
#endif
spectatorIcon->hide();
+ spectatorNumberLabel->hide();
}
//Set the playing mode to "manual"
#ifdef GUI_800x480
@@ -4272,6 +4275,7 @@ void gameTableImpl::refreshGameTableStyle()
label_handNumber->setText(HandString+":");
label_gameNumber->setText(GameString+":");
+ myGameTableStyle->setSpectatorNumberLabelStyle(spectatorNumberLabel);
}
void gameTableImpl::saveGameTableGeometry()
@@ -4470,6 +4474,10 @@ void gameTableImpl::refreshSpectatorsDisplay()
int iconY = 2;
spectatorIcon->move(iconX,iconY);
spectatorIcon->setPixmap(spectatorPix);
+ int labelX = this->centralWidget()->geometry().width() - spectatorPix.width() - 1;
+ int labelY = spectatorPix.height()+2;
+ spectatorNumberLabel->setGeometry(labelX, labelY, 32, 14);
+ spectatorNumberLabel->setText(QString("%1").arg(info.spectatorsDuringGame.size()));
QString spectatorList = QString(""+tr("Spectators")+":
");
PlayerIdList::const_iterator i = info.spectatorsDuringGame.begin();
@@ -4481,9 +4489,12 @@ void gameTableImpl::refreshSpectatorsDisplay()
}
spectatorList.remove(spectatorList.size()-4,4);
spectatorIcon->setToolTip(spectatorList);
+ spectatorNumberLabel->setToolTip(spectatorList);
} else {
spectatorIcon->setToolTip("");
spectatorIcon->clear();
+ spectatorNumberLabel->setToolTip("");
+ spectatorNumberLabel->clear();
}
}
diff --git a/src/gui/qt/gametable/gametableimpl.h b/src/gui/qt/gametable/gametableimpl.h
index c89c4d1f..5bbe874e 100755
--- a/src/gui/qt/gametable/gametableimpl.h
+++ b/src/gui/qt/gametable/gametableimpl.h
@@ -442,6 +442,7 @@ private:
QLabel *playerTipLabelArray[MAX_NUMBER_OF_PLAYERS];
QPixmap flipside;
QLabel *spectatorIcon;
+ QLabel *spectatorNumberLabel;
// Dialogs
startWindowImpl *myStartWindow;
diff --git a/src/gui/qt/styles/gametablestylereader.cpp b/src/gui/qt/styles/gametablestylereader.cpp
index fc5c74e3..5f19674f 100644
--- a/src/gui/qt/styles/gametablestylereader.cpp
+++ b/src/gui/qt/styles/gametablestylereader.cpp
@@ -1372,6 +1372,12 @@ void GameTableStyleReader::setCashLabelStyle(QLabel *cl)
cl->setStyleSheet("QLabel { "+ font2String +" font-size: "+cashFontSize+"px; font-weight: bold; color: #"+PlayerCashTextColor+"; }");
}
+void GameTableStyleReader::setSpectatorNumberLabelStyle(QLabel *snl)
+{
+ snl->setStyleSheet("QLabel { "+ font2String +" font-size: 12px; font-weight: bold; color: #"+MenuTextColor+"; }");
+ snl->setAlignment(Qt::AlignHCenter);
+}
+
void GameTableStyleReader::setSetLabelStyle(QLabel *sl)
{
sl->setStyleSheet("QLabel { "+ font2String +" font-size: "+setLabelFontSize+"px; font-weight: bold; color: #"+PlayerBetTextColor+"; }");
diff --git a/src/gui/qt/styles/gametablestylereader.h b/src/gui/qt/styles/gametablestylereader.h
index 69326409..ad2ff8a5 100644
--- a/src/gui/qt/styles/gametablestylereader.h
+++ b/src/gui/qt/styles/gametablestylereader.h
@@ -222,10 +222,9 @@ public:
void setVoteStringsStyle(QLabel*);
void setBetValueInputStyle(QSpinBox*);
void setSliderStyle(QSlider*);
-
void setTabWidgetStyle(QTabWidget*, QTabBar*);
-
void setWindowsGeometry(gameTableImpl*);
+ void setSpectatorNumberLabelStyle(QLabel*);
//set pics and fonts and colors
void setButtonsStyle(MyActionButton*, MyActionButton*, MyActionButton*, MyActionButton*, int);