Save some vertical pixels using fewer margin in HWMapContainer
authorunc0rr
Mon, 17 Dec 2007 18:05:58 +0000
changeset 677 9d0bcc3c903a
parent 676 2aa3082937ac
child 678 5cf90dbcb309
Save some vertical pixels using fewer margin in HWMapContainer
QTfrontend/gamecfgwidget.cpp
QTfrontend/mapContainer.cpp
--- a/QTfrontend/gamecfgwidget.cpp	Sun Dec 16 19:34:13 2007 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Mon Dec 17 18:05:58 2007 +0000
@@ -37,9 +37,9 @@
 	QHBoxLayout *GBoxMapLayout = new QHBoxLayout(GBoxMap);
 	GBoxMapLayout->setMargin(0);
 	pMapContainer = new HWMapContainer(GBoxMap);
-	GBoxMapLayout->addWidget(new QWidget);
+	GBoxMapLayout->addStretch();
 	GBoxMapLayout->addWidget(pMapContainer);
-	GBoxMapLayout->addWidget(new QWidget);
+	GBoxMapLayout->addStretch();
 
 	QGroupBox *GBoxOptions = new QGroupBox(this);
 	GBoxOptions->setTitle(QGroupBox::tr("Game scheme"));
--- a/QTfrontend/mapContainer.cpp	Sun Dec 16 19:34:13 2007 +0000
+++ b/QTfrontend/mapContainer.cpp	Mon Dec 17 18:05:58 2007 +0000
@@ -26,12 +26,14 @@
 #include <QLinearGradient>
 #include <QColor>
 #include <QTextStream>
+#include <QApplication>
 
 #include "hwconsts.h"
 
 HWMapContainer::HWMapContainer(QWidget * parent) :
   QWidget(parent), mainLayout(this)
 {
+  mainLayout.setContentsMargins (0, 1, 0, QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
   imageButt=new QPushButton(this);
   imageButt->setObjectName("imageButt");
   imageButt->setFixedSize(256, 128);