Better local game page layout
authorunc0rr
Tue, 13 Feb 2007 18:52:14 +0000
changeset 440 710d12dbeb61
parent 439 c336ed82e76d
child 441 f2920f08ea5f
Better local game page layout
QTfrontend/pages.cpp
--- a/QTfrontend/pages.cpp	Tue Feb 13 18:16:03 2007 +0000
+++ b/QTfrontend/pages.cpp	Tue Feb 13 18:52:14 2007 +0000
@@ -96,17 +96,26 @@
 PageLocalGame::PageLocalGame(QWidget* parent) : QWidget(parent)
 {
 	QFont * font14 = new QFont("MS Shell Dlg", 14);
-	QGridLayout * pageLayout = new QGridLayout(this);
-	BtnBack =	new QPushButton(this);
+	QVBoxLayout * pageLayout = new QVBoxLayout(this);
+	QHBoxLayout * topLayout = new QHBoxLayout();
+	QHBoxLayout * bottomLayout = new QHBoxLayout();
+	pageLayout->addLayout(topLayout, 100);
+	pageLayout->addLayout(bottomLayout, 0);
+
+	BtnBack = new QPushButton(this);
 	BtnBack->setFont(*font14);
 	BtnBack->setText(QPushButton::tr("Back"));
-	pageLayout->addWidget(BtnBack, 1, 0);
+	bottomLayout->addWidget(BtnBack, 100);
+	bottomLayout->addStretch(100);
 	BtnSimpleGame = new	QPushButton(this);
 	BtnSimpleGame->setFont(*font14);
 	BtnSimpleGame->setText(QPushButton::tr("Simple Game"));
-	pageLayout->addWidget(BtnSimpleGame, 1, 3);
+	bottomLayout->addWidget(BtnSimpleGame, 100);
+
 	gameCFG = new GameCFGWidget(this);
-	pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
+	topLayout->addStretch(100);
+	topLayout->addWidget(gameCFG);
+	topLayout->addStretch(100);
 }
 
 PageEditTeam::PageEditTeam(QWidget* parent) : QWidget(parent)