This commit is contained in:
doitux
2007-05-02 21:51:02 +00:00
parent f6fb29b883
commit 1413961624
2 changed files with 19 additions and 3 deletions
+1 -1
View File
@@ -1520,7 +1520,7 @@
<number>0</number>
</property>
<property name="spacing" >
<number>3</number>
<number>5</number>
</property>
<item>
<layout class="QHBoxLayout" >
+18 -2
View File
@@ -464,6 +464,11 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
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
// QShortcut *startNewGameKeys = new QShortcut(QKeySequence(Qt::Key_Control + Qt::Key_N), this);
// connect( startNewGameKeys, SIGNAL(activated() ), actionNewGame, SLOT( trigger() ) );
@@ -633,10 +638,14 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
gameData.handsBeforeRaise = myCreateNetworkGameDialog->spinBox_handsBeforeRaiseSmallBlind->value();
gameData.guiSpeed = myCreateNetworkGameDialog->spinBox_gameSpeed->value();
myStartNetworkGameDialog->treeWidget->clear();
mySession->startNetworkServer(gameData);
mySession->startNetworkClientForLocalServer();
myStartNetworkGameDialog->exec();
if (myStartNetworkGameDialog->result() == QDialog::Accepted ) {
mySession->initiateNetworkServerGame();
@@ -1998,6 +2007,11 @@ void mainWindowImpl::startNewHand() {
}
else {
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"));
breakAfterActualHand=FALSE;
@@ -2121,8 +2135,10 @@ void mainWindowImpl::breakButtonClicked() {
tempPalette.setColor(QPalette::ButtonText, QColor(240,240,240));
pushButton_break->setPalette(tempPalette);
// QFontMetrics tempMetrics = this->fontMetrics();
// int width = tempMetrics()
QFontMetrics tempMetrics = this->fontMetrics();
int width = tempMetrics.width(tr("Stop"));
pushButton_break->setMinimumSize(width+10,20);
pushButton_break->setText(tr("Stop"));
startNewHand();
}