This commit is contained in:
@@ -1520,7 +1520,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>3</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
|
|||||||
@@ -464,6 +464,11 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
|||||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) { actionLabelArray[i]->raise(); }
|
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) { actionLabelArray[i]->raise(); }
|
||||||
|
|
||||||
|
|
||||||
|
//resize stop-button depending on translation
|
||||||
|
QFontMetrics tempMetrics = this->fontMetrics();
|
||||||
|
int width = tempMetrics.width(tr("Stop"));
|
||||||
|
pushButton_break->setMinimumSize(width+10,20);
|
||||||
|
|
||||||
//ShortCuts
|
//ShortCuts
|
||||||
// QShortcut *startNewGameKeys = new QShortcut(QKeySequence(Qt::Key_Control + Qt::Key_N), this);
|
// QShortcut *startNewGameKeys = new QShortcut(QKeySequence(Qt::Key_Control + Qt::Key_N), this);
|
||||||
// connect( startNewGameKeys, SIGNAL(activated() ), actionNewGame, SLOT( trigger() ) );
|
// connect( startNewGameKeys, SIGNAL(activated() ), actionNewGame, SLOT( trigger() ) );
|
||||||
@@ -633,10 +638,14 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
|
|||||||
gameData.handsBeforeRaise = myCreateNetworkGameDialog->spinBox_handsBeforeRaiseSmallBlind->value();
|
gameData.handsBeforeRaise = myCreateNetworkGameDialog->spinBox_handsBeforeRaiseSmallBlind->value();
|
||||||
gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
|
gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
|
||||||
|
|
||||||
|
myStartNetworkGameDialog->treeWidget->clear();
|
||||||
|
|
||||||
mySession->startNetworkServer(gameData);
|
mySession->startNetworkServer(gameData);
|
||||||
mySession->startNetworkClientForLocalServer();
|
mySession->startNetworkClientForLocalServer();
|
||||||
|
|
||||||
myStartNetworkGameDialog->exec();
|
myStartNetworkGameDialog->exec();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (myStartNetworkGameDialog->result() == QDialog::Accepted ) {
|
if (myStartNetworkGameDialog->result() == QDialog::Accepted ) {
|
||||||
mySession->initiateNetworkServerGame();
|
mySession->initiateNetworkServerGame();
|
||||||
@@ -1998,6 +2007,11 @@ void mainWindowImpl::startNewHand() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pushButton_break->setDisabled(FALSE);
|
pushButton_break->setDisabled(FALSE);
|
||||||
|
|
||||||
|
QFontMetrics tempMetrics = this->fontMetrics();
|
||||||
|
int width = tempMetrics.width(tr("Start"));
|
||||||
|
pushButton_break->setMinimumSize(width+10,20);
|
||||||
|
|
||||||
pushButton_break->setText(tr("Start"));
|
pushButton_break->setText(tr("Start"));
|
||||||
breakAfterActualHand=FALSE;
|
breakAfterActualHand=FALSE;
|
||||||
|
|
||||||
@@ -2121,8 +2135,10 @@ void mainWindowImpl::breakButtonClicked() {
|
|||||||
tempPalette.setColor(QPalette::ButtonText, QColor(240,240,240));
|
tempPalette.setColor(QPalette::ButtonText, QColor(240,240,240));
|
||||||
pushButton_break->setPalette(tempPalette);
|
pushButton_break->setPalette(tempPalette);
|
||||||
|
|
||||||
// QFontMetrics tempMetrics = this->fontMetrics();
|
QFontMetrics tempMetrics = this->fontMetrics();
|
||||||
// int width = tempMetrics()
|
int width = tempMetrics.width(tr("Stop"));
|
||||||
|
pushButton_break->setMinimumSize(width+10,20);
|
||||||
|
|
||||||
pushButton_break->setText(tr("Stop"));
|
pushButton_break->setText(tr("Stop"));
|
||||||
startNewHand();
|
startNewHand();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user