Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

Commit 372c683

Browse files
committed
improve stream layout
1 parent 23d8abf commit 372c683

File tree

1 file changed

+39
-29
lines changed

1 file changed

+39
-29
lines changed

src/streamdialog.cpp

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,45 @@ StreamDialog::StreamDialog(QWidget *parent) : QDialog(parent) {
2626
layout->addWidget(m_videoGroupBox);
2727

2828
{
29-
auto videoLayout = new QVBoxLayout(m_videoGroupBox);
30-
31-
auto resolutionLabel = new QLabel(this);
32-
resolutionLabel->setText("Resolution");
33-
videoLayout->addWidget(resolutionLabel);
34-
35-
m_resolutionComboBox = new QComboBox(this);
36-
m_resolutionComboBox->addItem("2160p", "3840x2160");
37-
m_resolutionComboBox->addItem("1440p", "2560x1440");
38-
m_resolutionComboBox->addItem("1080p", "1920x1080");
39-
m_resolutionComboBox->addItem("720p", "1280x720");
40-
m_resolutionComboBox->addItem("480p", "854x480");
41-
m_resolutionComboBox->addItem("360p", "640x360");
42-
m_resolutionComboBox->addItem("240p", "426x240");
43-
m_resolutionComboBox->setCurrentText("720p");
44-
videoLayout->addWidget(m_resolutionComboBox);
45-
46-
auto framerateLabel = new QLabel(this);
47-
framerateLabel->setText("Framerate");
48-
videoLayout->addWidget(framerateLabel);
49-
50-
m_framerateComboBox = new QComboBox(this);
51-
m_framerateComboBox->addItem("144 FPS", 144);
52-
m_framerateComboBox->addItem("60 FPS", 60);
53-
m_framerateComboBox->addItem("30 FPS", 30);
54-
m_framerateComboBox->addItem("15 FPS", 15);
55-
m_framerateComboBox->addItem("5 FPS", 5);
56-
m_framerateComboBox->setCurrentText("30 FPS");
57-
videoLayout->addWidget(m_framerateComboBox);
29+
auto videoLayout = new QHBoxLayout(m_videoGroupBox);
30+
31+
{
32+
auto resolutionLayout = new QVBoxLayout(this);
33+
videoLayout->addLayout(resolutionLayout);
34+
35+
auto resolutionLabel = new QLabel(this);
36+
resolutionLabel->setText("Resolution");
37+
resolutionLayout->addWidget(resolutionLabel);
38+
39+
m_resolutionComboBox = new QComboBox(this);
40+
m_resolutionComboBox->addItem("2160p", "3840x2160");
41+
m_resolutionComboBox->addItem("1440p", "2560x1440");
42+
m_resolutionComboBox->addItem("1080p", "1920x1080");
43+
m_resolutionComboBox->addItem("720p", "1280x720");
44+
m_resolutionComboBox->addItem("480p", "854x480");
45+
m_resolutionComboBox->addItem("360p", "640x360");
46+
m_resolutionComboBox->addItem("240p", "426x240");
47+
m_resolutionComboBox->setCurrentText("720p");
48+
resolutionLayout->addWidget(m_resolutionComboBox);
49+
}
50+
51+
{
52+
auto framerateLayout = new QVBoxLayout(this);
53+
videoLayout->addLayout(framerateLayout);
54+
55+
auto framerateLabel = new QLabel(this);
56+
framerateLabel->setText("Framerate");
57+
framerateLayout->addWidget(framerateLabel);
58+
59+
m_framerateComboBox = new QComboBox(this);
60+
m_framerateComboBox->addItem("144 FPS", 144);
61+
m_framerateComboBox->addItem("60 FPS", 60);
62+
m_framerateComboBox->addItem("30 FPS", 30);
63+
m_framerateComboBox->addItem("15 FPS", 15);
64+
m_framerateComboBox->addItem("5 FPS", 5);
65+
m_framerateComboBox->setCurrentText("30 FPS");
66+
framerateLayout->addWidget(m_framerateComboBox);
67+
}
5868
}
5969

6070
m_audioGroupBox = new QGroupBox(this);

0 commit comments

Comments
 (0)