Fix broken styling of window size widgets
authorWuzzy <Wuzzy2@mail.ru>
Wed, 17 Jul 2019 23:52:01 +0200
changeset 15247 647157250713
parent 15246 4aa19b21707d
child 15248 7d957886170f
Fix broken styling of window size widgets
QTfrontend/ui/page/pageoptions.cpp
QTfrontend/ui/page/pageoptions.h
--- a/QTfrontend/ui/page/pageoptions.cpp	Wed Jul 17 00:33:55 2019 +0200
+++ b/QTfrontend/ui/page/pageoptions.cpp	Wed Jul 17 23:52:01 2019 +0200
@@ -282,12 +282,11 @@
             lblWinScreenRes->setText(QLabel::tr("Windowed Resolution"));
             groupGame->layout()->addWidget(lblWinScreenRes, 2, 0);
 
-            winResContainer = new QWidget();
-            QHBoxLayout * winResLayout = new QHBoxLayout(winResContainer);
+            QHBoxLayout * winResLayout = new QHBoxLayout();
             winResLayout->setSpacing(0);
-            groupGame->layout()->addWidget(winResContainer, 2, 1);
+            groupGame->layout()->addLayout(winResLayout, 2, 1, 1, 3);
 
-            QLabel *winLabelX = new QLabel(groupGame);
+            winLabelX = new QLabel(groupGame);
             //: Multiplication sign, to be used between two numbers. Note the “x” is only a dummy character, we recommend to use “×” if your language permits it
             winLabelX->setText(tr("x"));
             winLabelX->setFixedWidth(40);
@@ -976,7 +975,9 @@
     lblFullScreenRes->setVisible(state);
     CBResolution->setVisible(state);
     lblWinScreenRes->setVisible(!state);
-    winResContainer->setVisible(!state);
+    windowWidthEdit->setVisible(!state);
+    windowHeightEdit->setVisible(!state);
+    winLabelX->setVisible(!state);
 
     int index = this->CBStereoMode->currentIndex();
     if (index != 7 && index != 8 && index != 9)
--- a/QTfrontend/ui/page/pageoptions.h	Wed Jul 17 00:33:55 2019 +0200
+++ b/QTfrontend/ui/page/pageoptions.h	Wed Jul 17 23:52:01 2019 +0200
@@ -79,6 +79,7 @@
         QComboBox *CBResolution;
         QSpinBox *windowWidthEdit;
         QSpinBox *windowHeightEdit;
+        QLabel *winLabelX;
         QComboBox *CBStereoMode;
         QCheckBox *CBFrontendSound;
         QCheckBox *CBFrontendMusic;