Resolves issue 528. Fixed platform-specific order of buttons on seed prompt and new room prompt. Fixed height of back button on all pages -- now aligns to bottom. On pagemain, feedback and dlc buttons no longer fixed size.
authordag10
Fri, 01 Mar 2013 16:58:00 -0500
changeset 8622 2045bdf1b11b
parent 8619 253750e192e7
child 8623 93645b4ba0de
Resolves issue #528. Fixed platform-specific order of buttons on seed prompt and new room prompt. Fixed height of back button on all pages -- now aligns to bottom. On pagemain, feedback and dlc buttons no longer fixed size.
QTfrontend/ui/page/AbstractPage.cpp
QTfrontend/ui/page/pagemain.cpp
QTfrontend/ui/widget/roomnameprompt.cpp
QTfrontend/ui/widget/seedprompt.cpp
--- a/QTfrontend/ui/page/AbstractPage.cpp	Fri Mar 01 15:50:00 2013 -0500
+++ b/QTfrontend/ui/page/AbstractPage.cpp	Fri Mar 01 16:58:00 2013 -0500
@@ -53,7 +53,7 @@
     // add back/exit button
     btnBack = formattedButton(":/res/Exit.png", true);
     btnBack->setWhatsThis(tr("Go back"));
-    bottomLeftLayout->addWidget(btnBack, 0);
+    bottomLeftLayout->addWidget(btnBack, 0, Qt::AlignBottom);
 
     // add body layout as defined by the subclass
     pageLayout->addLayout(bodyLayoutDefinition(), 0, 0, 1, 3);
--- a/QTfrontend/ui/page/pagemain.cpp	Fri Mar 01 15:50:00 2013 -0500
+++ b/QTfrontend/ui/page/pagemain.cpp	Fri Mar 01 16:58:00 2013 -0500
@@ -78,12 +78,12 @@
     pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);
 
     BtnFeedback = addButton("Feedback", pageLayout, 4, 0, 1, 4, false);
-    BtnFeedback->setFixedSize(86, 27);
+    BtnFeedback->setStyleSheet("padding: 5px 10px");
     BtnFeedback->setWhatsThis(tr("Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars"));
     pageLayout->setAlignment(BtnFeedback, Qt::AlignHCenter);
 
     BtnDataDownload = addButton(tr("Downloadable Content"), pageLayout, 5, 0, 1, 4, false);
-    BtnDataDownload->setFixedSize(176, 27);
+    BtnDataDownload->setStyleSheet("padding: 5px 10px");
     BtnDataDownload->setWhatsThis(tr("Access the user created content downloadable from our website"));
     pageLayout->setAlignment(BtnDataDownload, Qt::AlignHCenter);
 
--- a/QTfrontend/ui/widget/roomnameprompt.cpp	Fri Mar 01 15:50:00 2013 -0500
+++ b/QTfrontend/ui/widget/roomnameprompt.cpp	Fri Mar 01 16:58:00 2013 -0500
@@ -62,8 +62,13 @@
     QPushButton * btnOkay = new QPushButton(tr("Create room"));
     connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
     connect(btnOkay, SIGNAL(clicked()), this, SLOT(accept()));
-    buttonLayout->addWidget(btnCancel);
-    buttonLayout->addWidget(btnOkay);
+#ifdef Q_WS_MAC
+        buttonLayout->addWidget(btnCancel);
+        buttonLayout->addWidget(btnOkay);
+#else
+        buttonLayout->addWidget(btnOkay);
+        buttonLayout->addWidget(btnCancel);
+#endif
     btnOkay->setDefault(true);
 
     setStyleSheet("QPushButton { padding: 5px; }");
--- a/QTfrontend/ui/widget/seedprompt.cpp	Fri Mar 01 15:50:00 2013 -0500
+++ b/QTfrontend/ui/widget/seedprompt.cpp	Fri Mar 01 16:58:00 2013 -0500
@@ -62,8 +62,13 @@
         QPushButton * btnOkay = new QPushButton(tr("Set seed"));
         connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
         connect(btnOkay, SIGNAL(clicked()), this, SLOT(accept()));
+#ifdef Q_WS_MAC
         buttonLayout->addWidget(btnCancel);
         buttonLayout->addWidget(btnOkay);
+#else
+        buttonLayout->addWidget(btnOkay);
+        buttonLayout->addWidget(btnCancel);
+#endif
         btnOkay->setDefault(true);
     }
     else