修正采集设置对话框输入面板被压缩重叠

对话框把输入面板最大高度限制为 320,低于各行所需的自然高度,Finger 视频与传感器配置两行重叠。改为只限制预览图高度,并新增布局测试;已在 Windows 上目视确认。
This commit is contained in:
ykcheungab
2026-10-19 09:42:41 +08:00
parent a0c13c1dc6
commit bc5dfc035d
2 changed files with 32 additions and 4 deletions
@@ -65,6 +65,10 @@ DEFAULT_MBIT_PER_S = 10.0
#: itself. It only shapes the size estimate, never a recorded window.
STEP_OVERHEAD_S = 5.0
#: Qt's "no limit" for a widget's height, and the tallest preview this dialog shows.
_UNBOUNDED = 16777215
_PREVIEW_MAX_HEIGHT = 200
#: One probe per process. The probe writes three real clips, and every window in
#: this app would otherwise repeat it; the answer cannot change while the process
#: runs because it is a property of this machine's OpenCV build.
@@ -130,11 +134,14 @@ class CaptureSettingsDialog(QDialog):
self.input_group = QGroupBox(page)
self.input_group.setObjectName("groupBox")
input_layout = QVBoxLayout(self.input_group)
# The input panel is the live image plus its controls. It stays bounded
# here: the dialog has four sections, and a preview that expands would push
# the bundle, session and recording settings below the fold on every screen.
source_panel.setMaximumHeight(320)
# The input panel is the live image plus its controls. The preview is what
# is bounded here: the dialog has four sections, and a preview that expands
# would push the bundle, session and recording settings below the fold. The
# panel itself is never capped. Its field rows, buttons and hints need
# their natural height, and a cap below that squeezes them into each other.
source_panel.setMaximumHeight(_UNBOUNDED)
source_panel.preview.setMinimumSize(140, 90)
source_panel.preview.setMaximumHeight(_PREVIEW_MAX_HEIGHT)
input_layout.addWidget(source_panel)
self.input_group.setSizePolicy(
QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Maximum