Add background image to team select widget
authorunc0rr
Sun, 26 Oct 2008 17:18:58 +0000
changeset 1425 7ee750565e2d
parent 1424 2b45d88716b0
child 1426 b80048899fa7
Add background image to team select widget
QTfrontend/main.cpp
QTfrontend/teamselect.cpp
--- a/QTfrontend/main.cpp	Sun Oct 26 17:17:07 2008 +0000
+++ b/QTfrontend/main.cpp	Sun Oct 26 17:18:58 2008 +0000
@@ -200,7 +200,13 @@
 				"color: #ffcc00;"
 				"font: bold 14px;"
 				"}"
-
+			
+			"VertScrArea{"
+				"background-image: url(\":/res/panelbg.png\");"
+				"background-position: bottom center;"
+				"background-repeat: repeat-x;"
+				"}"
+			
 			"IconedGroupBox{"
 				"border: solid;"
 				"border-width: 3px;"
--- a/QTfrontend/teamselect.cpp	Sun Oct 26 17:17:07 2008 +0000
+++ b/QTfrontend/teamselect.cpp	Sun Oct 26 17:18:58 2008 +0000
@@ -204,11 +204,21 @@
 
 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int maxHeight)
 {
-  VertScrArea* area=new VertScrArea(color);
-  area->setWidget(pfteams);
-  mainLayout.addWidget(area, 30);
-  if (maxHeight > 0)
-  	area->setMaximumHeight(maxHeight);
+	VertScrArea* area = new VertScrArea(color);
+	area->setWidget(pfteams);
+	mainLayout.addWidget(area, 30);
+	if (maxHeight > 0)
+	{
+		area->setMaximumHeight(maxHeight);
+		area->setStyleSheet(
+				"FrameTeams{"
+					"border: solid;"
+					"border-width: 1px;"
+					"border-radius: 16px;"
+					"border-color: #ffcc00;"
+					"}"
+		);
+	}
 }
 
 TeamSelWidget::TeamSelWidget(QWidget* parent) :
@@ -216,20 +226,7 @@
 {
 	setTitle(QGroupBox::tr("Playing teams"));
 	framePlaying = new FrameTeams();
-	framePlaying->setStyleSheet(
-			"FrameTeams{"
-				"border: solid;"
-				"border-width: 1px;"
-				"border-radius: 16px;"
-				"border-color: #ffcc00;"
-				"}"
-	);
 	frameDontPlaying = new FrameTeams();
-	frameDontPlaying->setStyleSheet(
-			"FrameTeams{"
-				"background-image: url(\":/res/panelbg.png\");"
-				"}"
-	);
 	
 	QPalette p;
 	p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));