Reorganize net game page
authorunc0rr
Mon, 12 Jan 2009 16:36:29 +0000
changeset 1647 ab0c8c4be7b3
parent 1646 19b3784ac9d2
child 1648 32d99a3c7998
Reorganize net game page
QTfrontend/frameTeam.cpp
QTfrontend/pages.cpp
QTfrontend/teamselect.cpp
--- a/QTfrontend/frameTeam.cpp	Mon Jan 12 14:57:42 2009 +0000
+++ b/QTfrontend/frameTeam.cpp	Mon Jan 12 16:36:29 2009 +0000
@@ -33,7 +33,8 @@
 	setAutoFillBackground(true);
 	
 	mainLayout.setSpacing(1);
-
+	mainLayout.setContentsMargins(4, 4, 4, 4);
+	
 	availableColors.push_back(*color1);
 	availableColors.push_back(*color2);
 	availableColors.push_back(*color3);
--- a/QTfrontend/pages.cpp	Mon Jan 12 14:57:42 2009 +0000
+++ b/QTfrontend/pages.cpp	Mon Jan 12 16:36:29 2009 +0000
@@ -544,7 +544,7 @@
 
 	// chatwidget
 	pChatWidget = new HWChatWidget(this);
-	pageLayout->addWidget(pChatWidget, 1, 0, 2, 1);
+	pageLayout->addWidget(pChatWidget, 1, 0, 1, 2);
 	pageLayout->setRowStretch(1, 100);
 
 	pGameCFG = new GameCFGWidget(this);
@@ -552,7 +552,7 @@
 
 	pNetTeamsWidget = new TeamSelWidget(this);
 	pNetTeamsWidget->setAcceptOuter(true);
-	pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1);
+	pageLayout->addWidget(pNetTeamsWidget, 0, 1);
 
 	BtnGo = new QPushButton(this);
 	BtnGo->setFont(*font14);
--- a/QTfrontend/teamselect.cpp	Mon Jan 12 14:57:42 2009 +0000
+++ b/QTfrontend/teamselect.cpp	Mon Jan 12 16:36:29 2009 +0000
@@ -202,14 +202,15 @@
   emit setEnabledGameStart(curPlayingTeams.size()>1);
 }
 
-void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int maxHeight)
+void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int fixedHeight)
 {
 	VertScrArea* area = new VertScrArea(color);
 	area->setWidget(pfteams);
 	mainLayout.addWidget(area, 30);
-	if (maxHeight > 0)
+	if (fixedHeight > 0)
 	{
-		area->setMaximumHeight(maxHeight);
+		area->setMinimumHeight(fixedHeight);
+		area->setMaximumHeight(fixedHeight);
 		area->setStyleSheet(
 				"FrameTeams{"
 					"border: solid;"
@@ -230,7 +231,7 @@
 	
 	QPalette p;
 	p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
-	addScrArea(framePlaying, p.color(QPalette::Window).light(105), 200);
+	addScrArea(framePlaying, p.color(QPalette::Window).light(105), 250);
 	addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0);
 	QPushButton * btnSetup = new QPushButton(this);
 	btnSetup->setText(QPushButton::tr("Setup"));