Pagetraining: Move style sheet to CSS files
authorWuzzy <Wuzzy2@mail.ru>
Sun, 21 Jul 2019 11:22:06 +0200
changeset 15278 752b44ffa707
parent 15277 f7b33ad8d502
child 15279 1ce9b717bb41
Pagetraining: Move style sheet to CSS files
QTfrontend/res/css/april1.css
QTfrontend/res/css/birthday.css
QTfrontend/res/css/christmas.css
QTfrontend/res/css/easter.css
QTfrontend/res/css/qt.css
QTfrontend/ui/page/pagetraining.cpp
--- a/QTfrontend/res/css/april1.css	Thu Jul 18 21:00:28 2019 +0200
+++ b/QTfrontend/res/css/april1.css	Sun Jul 21 11:22:06 2019 +0200
@@ -560,3 +560,12 @@
 background-color: rgb(23, 11, 54);
 border-width: 0px;
 }
+#trainingList {
+border-style: none;
+padding-top: 6px;
+}
+#trainingList::item
+{
+padding-top: 2px;
+padding-bottom: 2px;
+}
--- a/QTfrontend/res/css/birthday.css	Thu Jul 18 21:00:28 2019 +0200
+++ b/QTfrontend/res/css/birthday.css	Sun Jul 21 11:22:06 2019 +0200
@@ -564,3 +564,12 @@
 background-color: rgb(23, 11, 54);
 border-width: 0px;
 }
+#trainingList {
+border-style: none;
+padding-top: 6px;
+}
+#trainingList::item
+{
+padding-top: 2px;
+padding-bottom: 2px;
+}
--- a/QTfrontend/res/css/christmas.css	Thu Jul 18 21:00:28 2019 +0200
+++ b/QTfrontend/res/css/christmas.css	Sun Jul 21 11:22:06 2019 +0200
@@ -559,3 +559,12 @@
 background-color: rgb(23, 11, 54);
 border-width: 0px;
 }
+#trainingList {
+border-style: none;
+padding-top: 6px;
+}
+#trainingList::item
+{
+padding-top: 2px;
+padding-bottom: 2px;
+}
--- a/QTfrontend/res/css/easter.css	Thu Jul 18 21:00:28 2019 +0200
+++ b/QTfrontend/res/css/easter.css	Sun Jul 21 11:22:06 2019 +0200
@@ -555,3 +555,12 @@
 background-color: rgb(23, 11, 54);
 border-width: 0px;
 }
+#trainingList {
+border-style: none;
+padding-top: 6px;
+}
+#trainingList::item
+{
+padding-top: 2px;
+padding-bottom: 2px;
+}
--- a/QTfrontend/res/css/qt.css	Thu Jul 18 21:00:28 2019 +0200
+++ b/QTfrontend/res/css/qt.css	Sun Jul 21 11:22:06 2019 +0200
@@ -551,3 +551,12 @@
 background-color: rgb(23, 11, 54);
 border-width: 0px;
 }
+#trainingList {
+border-style: none;
+padding-top: 6px;
+}
+#trainingList::item
+{
+padding-top: 2px;
+padding-bottom: 2px;
+}
--- a/QTfrontend/ui/page/pagetraining.cpp	Thu Jul 18 21:00:28 2019 +0200
+++ b/QTfrontend/ui/page/pagetraining.cpp	Sun Jul 21 11:22:06 2019 +0200
@@ -94,20 +94,18 @@
     tbw->setFixedWidth(400);
     pageLayout->setAlignment(tbw, Qt::AlignHCenter);
 
-    QString style = "QListWidget { border-style: none; padding-top: 6px; } QListWidget::item { padding-top: 2px; padding-bottom: 2px; }";
- 
     // training/challenge/scenario lists
     lstTrainings = new QListWidget(this);
     lstTrainings ->setWhatsThis(tr("Pick the training to play"));
-    lstTrainings->setStyleSheet(style);
+    lstTrainings ->setObjectName("trainingList");
 
     lstChallenges = new QListWidget(this);
     lstChallenges ->setWhatsThis(tr("Pick the challenge to play"));
-    lstChallenges->setStyleSheet(style);
+    lstChallenges ->setObjectName("trainingList");
 
     lstScenarios= new QListWidget(this);
     lstScenarios->setWhatsThis(tr("Pick the scenario to play"));
-    lstScenarios->setStyleSheet(style);
+    lstScenarios->setObjectName("trainingList");
 
     tbw->addTab(lstTrainings, tr("Trainings"));
     tbw->addTab(lstChallenges, tr("Challenges"));