Explorar el Código

UI: Fix filter layout issue

In commit 57f8c5e3, a stretch spacer was put in to the filter window UI,
which was meant to be used when there's no video for the source.
However, it was always put in, and would stretch the layout even when
there was video.  This fixes that issue by only inserting a stretch
spacer when there's no video for the source.
jp9000 hace 7 años
padre
commit
864e3698e8
Se han modificado 2 ficheros con 1 adiciones y 13 borrados
  1. 0 13
      UI/forms/OBSBasicFilters.ui
  2. 1 0
      UI/window-basic-filters.cpp

+ 0 - 13
UI/forms/OBSBasicFilters.ui

@@ -390,19 +390,6 @@
          </item>
         </layout>
        </item>
-       <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout_2">
          <property name="spacing">

+ 1 - 0
UI/window-basic-filters.cpp

@@ -133,6 +133,7 @@ OBSBasicFilters::OBSBasicFilters(QWidget *parent, OBSSource source_)
 					addDrawCallback);
 	} else {
 		ui->rightLayout->setContentsMargins(0, noPreviewMargin, 0, 0);
+		ui->rightContainerLayout->insertStretch(1);
 		ui->preview->hide();
 	}
 }