Apply minimal padding to all text buttons in frontend
authorWuzzy <almikes@aol.com>
Wed, 12 Apr 2017 20:14:17 +0200
changeset 12241 a0ed4caa6d35
parent 12240 0844c680b4bc
child 12242 76fa467b6833
Apply minimal padding to all text buttons in frontend
QTfrontend/ui/page/pagecampaign.cpp
QTfrontend/ui/page/pagedata.cpp
QTfrontend/ui/page/pagemultiplayer.cpp
QTfrontend/ui/page/pageplayrecord.cpp
QTfrontend/ui/page/pageroomslist.cpp
QTfrontend/ui/page/pagetraining.cpp
QTfrontend/ui/widget/keybinder.cpp
--- a/QTfrontend/ui/page/pagecampaign.cpp	Wed Apr 12 19:46:59 2017 +0200
+++ b/QTfrontend/ui/page/pagecampaign.cpp	Wed Apr 12 20:14:17 2017 +0200
@@ -87,6 +87,7 @@
     const QIcon& lp = QIcon(":/res/Start.png");
     QSize sz = lp.actualSize(QSize(65535, 65535));
     BtnStartCampaign = new QPushButton();
+    BtnStartCampaign->setStyleSheet("padding: 5px 10px");
     BtnStartCampaign->setText(QPushButton::tr("Start"));
     BtnStartCampaign->setMinimumWidth(sz.width() + 60);
     BtnStartCampaign->setIcon(lp);
--- a/QTfrontend/ui/page/pagedata.cpp	Wed Apr 12 19:46:59 2017 +0200
+++ b/QTfrontend/ui/page/pagedata.cpp	Wed Apr 12 20:14:17 2017 +0200
@@ -60,6 +60,7 @@
     pbHome->setWhatsThis(tr("Return to the start page"));
 
     pbOpenDir = addButton(tr("Open packages directory"), bottomLayout, 2, false, Qt::AlignBottom);
+    pbOpenDir->setStyleSheet("padding: 5px 10px");
     pbOpenDir->setMinimumHeight(50);
 
     bottomLayout->setStretch(2, 1);
--- a/QTfrontend/ui/page/pagemultiplayer.cpp	Wed Apr 12 19:46:59 2017 +0200
+++ b/QTfrontend/ui/page/pagemultiplayer.cpp	Wed Apr 12 20:14:17 2017 +0200
@@ -59,14 +59,14 @@
     const QIcon& lp = QIcon(":/res/Start.png");
     QSize sz = lp.actualSize(QSize(65535, 65535));
     BtnStartMPGame = new QPushButton();
+    BtnStartMPGame->setStyleSheet("padding: 5px 10px");
     BtnStartMPGame->setText(tr("Start"));
     BtnStartMPGame->setWhatsThis(tr("Start fighting (requires at least 2 teams)"));
-    BtnStartMPGame->setMinimumWidth(sz.width() + 60);
     BtnStartMPGame->setIcon(lp);
     BtnStartMPGame->setFixedHeight(50);
     BtnStartMPGame->setIconSize(sz);
     BtnStartMPGame->setFlat(true);
-    BtnStartMPGame->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+    BtnStartMPGame->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
 
     footerLayout->addStretch();
     footerLayout->addWidget(BtnStartMPGame, 0, Qt::AlignBottom);
--- a/QTfrontend/ui/page/pageplayrecord.cpp	Wed Apr 12 19:46:59 2017 +0200
+++ b/QTfrontend/ui/page/pageplayrecord.cpp	Wed Apr 12 20:14:17 2017 +0200
@@ -62,7 +62,7 @@
     BtnPlayDemo = addButton(tr("Play demo"), bottomLayout, 0, false, Qt::AlignBottom);
     const QIcon& lp = QIcon(":/res/Start.png");
     QSize sz = lp.actualSize(QSize(65535, 65535));
-    BtnPlayDemo->setMinimumWidth(sz.width());
+    BtnPlayDemo->setStyleSheet("padding: 5px 10px");
     BtnPlayDemo->setIcon(lp);
     BtnPlayDemo->setFixedHeight(50);
     BtnPlayDemo->setIconSize(sz);
--- a/QTfrontend/ui/page/pageroomslist.cpp	Wed Apr 12 19:46:59 2017 +0200
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Wed Apr 12 20:14:17 2017 +0200
@@ -176,6 +176,7 @@
 
     BtnAdmin = addButton(tr("Admin features"), bottomLayout, 0, false, Qt::AlignBottom);
     BtnAdmin->setMinimumSize(180, 50);
+    BtnAdmin->setStyleSheet("padding: 5px 10px");
     BtnAdmin->setWhatsThis(tr("Open server administration page"));
 
     return bottomLayout;
--- a/QTfrontend/ui/page/pagetraining.cpp	Wed Apr 12 19:46:59 2017 +0200
+++ b/QTfrontend/ui/page/pagetraining.cpp	Wed Apr 12 20:14:17 2017 +0200
@@ -107,6 +107,7 @@
     const QIcon& lp = QIcon(":/res/Start.png");
     QSize sz = lp.actualSize(QSize(65535, 65535));
     btnStart = new QPushButton();
+    btnStart->setStyleSheet("padding: 5px 10px");
     btnStart->setText(QPushButton::tr("Start"));
     btnStart->setWhatsThis(tr("Start fighting"));
     btnStart->setMinimumWidth(sz.width() + 60);
--- a/QTfrontend/ui/widget/keybinder.cpp	Wed Apr 12 19:46:59 2017 +0200
+++ b/QTfrontend/ui/widget/keybinder.cpp	Wed Apr 12 20:14:17 2017 +0200
@@ -60,6 +60,7 @@
     {
         QPushButton * btnResetAll = new QPushButton(resetButtonText);
         catListContainer->addWidget(btnResetAll);
+        btnResetAll->setStyleSheet("padding: 5px 10px");
         btnResetAll->setFixedHeight(40);
         catListContainer->setStretch(1, 0);
         catListContainer->setSpacing(10);