Some padding tweaks in options and team editor pages. Fixes insane width of context menu of hog name line edit
authorWuzzy <Wuzzy2@mail.ru>
Fri, 16 Mar 2018 16:35:08 +0100
changeset 13232 26c739440bef
parent 13231 4028d7f85233
child 13233 d23742ccf92b
Some padding tweaks in options and team editor pages. Fixes insane width of context menu of hog name line edit
QTfrontend/ui/page/pageeditteam.cpp
QTfrontend/ui/page/pageoptions.cpp
--- a/QTfrontend/ui/page/pageeditteam.cpp	Fri Mar 16 02:02:27 2018 +0100
+++ b/QTfrontend/ui/page/pageeditteam.cpp	Fri Mar 16 16:35:08 2018 +0100
@@ -77,7 +77,7 @@
         HHNameEdit[i]->setMinimumWidth(120);
         HHNameEdit[i]->setFixedHeight(36);
         HHNameEdit[i]->setWhatsThis(tr("This hedgehog's name"));
-        HHNameEdit[i]->setStyleSheet("padding: 6px;");
+        HHNameEdit[i]->setStyleSheet("QLineEdit { padding: 6px; }");
         GBHLayout->addWidget(HHNameEdit[i], i + 1, 1, 1, 2);
 
         btnRandomHogName[i] = addButton(":/res/dice.png", GBHLayout, i + 1, 5, 1, 1, true);
@@ -128,6 +128,7 @@
     TeamNameEdit = new QLineEdit(GBoxTeam);
     TeamNameEdit->setMaxLength(64);
     TeamNameEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+    TeamNameEdit->setStyleSheet("QLineEdit { padding: 6px; }");
     GBTLayout->addWidget(TeamNameEdit, 0, 1, 1, 2);
     vbox2->addWidget(GBoxTeam);
 
--- a/QTfrontend/ui/page/pageoptions.cpp	Fri Mar 16 02:02:27 2018 +0100
+++ b/QTfrontend/ui/page/pageoptions.cpp	Fri Mar 16 16:35:08 2018 +0100
@@ -134,6 +134,7 @@
 
             CBTeamName = new QComboBox(groupTeams);
             CBTeamName->setMaxVisibleItems(50);
+            CBTeamName->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
             groupTeams->layout()->addWidget(CBTeamName, 0, 0);
 
             BtnNewTeam = new QPushButton(groupTeams);
@@ -175,6 +176,7 @@
 
             SchemesName = new QComboBox(groupSchemes);
             SchemesName->setMaxVisibleItems(50);
+            SchemesName->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
             groupSchemes->layout()->addWidget(SchemesName, 0, 0);
 
             SchemeNew = new QPushButton(groupSchemes);
@@ -207,6 +209,7 @@
 
             WeaponsName = new QComboBox(groupWeapons);
             WeaponsName->setMaxVisibleItems(50);
+            WeaponsName->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
             groupWeapons->layout()->addWidget(WeaponsName, 0, 0);
 
             WeaponNew = new QPushButton(groupWeapons);