put controls into scroll area and fix typo

This commit is contained in:
shun-iwasawa 2021-09-13 09:41:44 +09:00 committed by manongjohn
parent e5e01cdeaa
commit 55f5485b7c

View file

@ -1498,7 +1498,7 @@ ExportXsheetPdfPopup::ExportXsheetPdfPopup()
m_serialFrameNumberCB =
new QCheckBox(tr("Put Serial Frame Numbers Over Pages"), this);
m_levelNameOnBottomCB =
new QCheckBox(tr("Print Level Names On The Botom"), this);
new QCheckBox(tr("Print Level Names On The Bottom"), this);
m_sceneNameEdit = new QLineEdit(this);
m_memoEdit = new QTextEdit(this);
@ -1572,8 +1572,15 @@ ExportXsheetPdfPopup::ExportXsheetPdfPopup()
}
mainLay->addLayout(previewLay, 1);
QVBoxLayout* rightLay = new QVBoxLayout();
rightLay->setMargin(0);
rightLay->setSpacing(10);
{
QScrollArea* scrollArea = new QScrollArea(this);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
QWidget* scrollPanel = new QWidget(this);
QVBoxLayout* controlLay = new QVBoxLayout();
controlLay->setMargin(10);
controlLay->setMargin(20);
controlLay->setSpacing(10);
{
QGroupBox* tmplGBox = new QGroupBox(tr("Template Settings"), this);
@ -1649,9 +1656,13 @@ ExportXsheetPdfPopup::ExportXsheetPdfPopup()
controlLay->addWidget(exportGBox, 0);
controlLay->addStretch(1);
}
scrollPanel->setLayout(controlLay);
scrollArea->setWidget(scrollPanel);
rightLay->addWidget(scrollArea, 1);
QGridLayout* saveLay = new QGridLayout();
saveLay->setMargin(5);
saveLay->setMargin(15);
saveLay->setHorizontalSpacing(5);
saveLay->setVerticalSpacing(10);
{
@ -1664,12 +1675,10 @@ ExportXsheetPdfPopup::ExportXsheetPdfPopup()
saveLay->addWidget(m_fileNameFld, 1, 1,
Qt::AlignLeft | Qt::AlignVCenter);
}
controlLay->addLayout(saveLay, 0);
controlLay->addSpacing(20);
rightLay->addLayout(saveLay, 0);
QHBoxLayout* btnLay = new QHBoxLayout();
btnLay->setMargin(0);
btnLay->setMargin(10);
btnLay->setSpacing(10);
{
btnLay->addStretch(1);
@ -1677,9 +1686,9 @@ ExportXsheetPdfPopup::ExportXsheetPdfPopup()
btnLay->addWidget(exportPngBtn, 0);
btnLay->addWidget(cancelBtn, 0);
}
controlLay->addLayout(btnLay, 0);
rightLay->addLayout(btnLay, 0);
}
mainLay->addLayout(controlLay, 0);
mainLay->addLayout(rightLay, 0);
}
m_topLayout->addLayout(mainLay, 1);