fix lobby layout issues
authorsheepluva
Fri, 21 Oct 2011 19:27:40 +0200 (2011-10-21)
changeset 6172 809e1076ffe2
parent 6171 8627698134b6
child 6173 6cb88fec7a79
fix lobby layout issues
QTfrontend/ui/page/pageroomslist.cpp
--- a/QTfrontend/ui/page/pageroomslist.cpp	Fri Oct 21 19:17:08 2011 +0200
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Fri Oct 21 19:27:40 2011 +0200
@@ -17,6 +17,7 @@
  */
 
 #include <QGridLayout>
+#include <QHBoxLayout>
 #include <QPushButton>
 #include <QComboBox>
 #include <QLabel>
@@ -111,14 +112,20 @@
 
 QLayout * PageRoomsList::footerLayoutDefinition()
 {
-    QGridLayout * bottomLayout = new QGridLayout();
+    QHBoxLayout * bottomLayout = new QHBoxLayout();
 
     lblCount = new QLabel(this);
-    bottomLayout->addWidget(lblCount, 0, 0, Qt::AlignHCenter);
+    bottomLayout->addWidget(lblCount, 0, Qt::AlignHCenter);
+    bottomLayout->setStretchFactor(lblCount, 1);
     lblCount->setText("?");
     lblCount->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
 
-    BtnAdmin = addButton(tr("Admin features"), bottomLayout, 6, 2);
+    BtnAdmin = addButton(tr("Admin features"), bottomLayout, 1);
+    BtnAdmin->setMinimumWidth(160);
+
+    // strech left part
+    bottomLayout->setStretch(0, 1);
+    bottomLayout->setStretch(1, 0);
 
     return bottomLayout;
 }