소스 검색

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 7 년 전
부모
커밋
864e3698e8
2개의 변경된 파일1개의 추가작업 그리고 13개의 파일을 삭제
  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();
 	}
 }