transparent background for buttons at main page
authordisplacer
Mon, 04 Aug 2008 19:28:01 +0000
changeset 1149 c2d3b4f71836
parent 1148 e44de3416af4
child 1150 ae86e36dad2e
transparent background for buttons at main page
QTfrontend/main.cpp
QTfrontend/pages.cpp
QTfrontend/pages.h
--- a/QTfrontend/main.cpp	Mon Aug 04 19:04:46 2008 +0000
+++ b/QTfrontend/main.cpp	Mon Aug 04 19:28:01 2008 +0000
@@ -71,6 +71,9 @@
 		   "background-repeat: no-repeat;"
 		   "background-color: #3f095f;"
 		   "}"
+		   "PageMain > QPushButton{"
+		   "border: solid transparent;"
+		   "}"
 		   ).arg(imgAddr)
 	   );
 	
--- a/QTfrontend/pages.cpp	Mon Aug 04 19:04:46 2008 +0000
+++ b/QTfrontend/pages.cpp	Mon Aug 04 19:28:01 2008 +0000
@@ -68,30 +68,21 @@
 
 	BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 1, 0, 1, 2, QSize(314, 289));
 	pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignCenter);
-	//BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnMultiplayer = new QPushButton(tr("Multiplayer"));// addButton(tr("Multiplayer"), pageLayout, 1, 1);
-	//pageLayout->setAlignment(BtnMultiplayer, Qt::AlignCenter);
-	//BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnNet = addButton(":/res/Network play.png", pageLayout, 1, 2, 1, 2, QSize(314, 289));
-	//BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnLoad = new QPushButton(tr("Saved games"));//addButton(tr("Saved games"), pageLayout, 3, 1);
-	//BtnLoad->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnDemos = new QPushButton(tr("Demos")); // addButton(tr("Demos"), pageLayout, 4, 1);
-	//BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnSetup = addButton(":/res/Settings.png", pageLayout, 2, 3, QSize(54, 50));
-	//BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnInfo = addButton(":/res/About.png", pageLayout, 2, 1, 1, 2, QSize(116, 37));
 	pageLayout->setAlignment(BtnInfo, Qt::AlignCenter);
-	//BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnExit = addButton(":/res/Exit.png", pageLayout, 2, 0, 1, 1, QSize(58, 52));
-	//BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 }
 
 PageEditTeam::PageEditTeam(QWidget* parent) :
--- a/QTfrontend/pages.h	Mon Aug 04 19:04:46 2008 +0000
+++ b/QTfrontend/pages.h	Mon Aug 04 19:28:01 2008 +0000
@@ -70,6 +70,7 @@
       butt->setFixedSize(sz+QSize(2, 2));
       butt->setIconSize(sz);
       butt->setFlat(true);
+      butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
     }
     grid->addWidget(butt, wy, wx);
     return butt;
@@ -86,6 +87,7 @@
       butt->setFixedSize(sz+QSize(2, 2));
       butt->setIconSize(sz);
       butt->setFlat(true);
+      butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
     }
     grid->addWidget(butt, wy, wx, rowSpan, columnSpan);
     return butt;