Fix hard-to-read text on campaign and training page in frontend at October 31
authorWuzzy <Wuzzy2@mail.ru>
Tue, 07 Aug 2018 16:23:51 +0200
changeset 13637 4c49a4944884
parent 13636 946b21a1fbf6
child 13638 35d93b1e7fef
Fix hard-to-read text on campaign and training page in frontend at October 31 The text was yellow against a white background (the moon in the Halloween background). This is fixed by darkening the critical area.
QTfrontend/res/css/birthday.css
QTfrontend/ui/page/pagecampaign.cpp
QTfrontend/ui/page/pagetraining.cpp
--- a/QTfrontend/res/css/birthday.css	Tue Aug 07 16:07:13 2018 +0200
+++ b/QTfrontend/res/css/birthday.css	Tue Aug 07 16:23:51 2018 +0200
@@ -35,6 +35,11 @@
 }
 QDialog{ /* CUSTOM */
 background-color: #100308; /* CUSTOM */
+} /* CUSTOM: This makes yellow text readable (because yellow text vs white moon) */
+#campaignInfo, #trainingInfo{ /* CUSTOM */
+background-color: rgba(20, 20, 20, 70%); /* CUSTOM */
+border-radius: 16px;
+padding: 6px;
 } /* CUSTOM */
 
 * {
--- a/QTfrontend/ui/page/pagecampaign.cpp	Tue Aug 07 16:07:13 2018 +0200
+++ b/QTfrontend/ui/page/pagecampaign.cpp	Tue Aug 07 16:23:51 2018 +0200
@@ -33,7 +33,10 @@
     pageLayout->setRowStretch(0, 1);
     pageLayout->setRowStretch(3, 1);
 
+    QWidget * infoWidget = new QWidget();
+    infoWidget->setObjectName("campaignInfo");
     QGridLayout * infoLayout = new QGridLayout();
+    infoWidget->setLayout(infoLayout);
     infoLayout->setColumnStretch(0, 1);
     infoLayout->setColumnStretch(1, 1);
     infoLayout->setColumnStretch(2, 1);
@@ -69,7 +72,7 @@
     infoLayout->addWidget(lbltitle,0,2,1,2);
     infoLayout->addWidget(lbldescription,1,2,1,2);
 
-    pageLayout->addLayout(infoLayout, 0, 0, 2, 4);
+    pageLayout->addWidget(infoWidget, 0, 0, 2, 4);
     pageLayout->addWidget(lblteam, 2, 1);
     pageLayout->addWidget(lblcampaign, 3, 1);
     pageLayout->addWidget(lblmission, 4, 1);
--- a/QTfrontend/ui/page/pagetraining.cpp	Tue Aug 07 16:07:13 2018 +0200
+++ b/QTfrontend/ui/page/pagetraining.cpp	Tue Aug 07 16:23:51 2018 +0200
@@ -56,7 +56,10 @@
 // right column
 
     // info area (caption on top, description below)
+    QWidget * infoWidget = new QWidget();
     QVBoxLayout * infoLayout = new QVBoxLayout();
+    infoWidget->setObjectName("trainingInfo");
+    infoWidget->setLayout(infoLayout);
 
     lblCaption = new QLabel();
     lblCaption->setMinimumWidth(360);
@@ -70,8 +73,8 @@
     infoLayout->addWidget(lblCaption);
     infoLayout->addWidget(lblDescription);
 
-    pageLayout->addLayout(infoLayout, 0, 1);
-    pageLayout->setAlignment(infoLayout, Qt::AlignLeft);
+    pageLayout->addWidget(infoWidget, 0, 1);
+    pageLayout->setAlignment(infoWidget, Qt::AlignLeft);
 
 
     // tab widget containing all lists