Update NewBoxWizard.cpp

This commit is contained in:
love-code-yeyixiao 2024-05-18 15:00:49 +08:00
parent d0ece79771
commit 7fa2de6305
1 changed files with 10 additions and 1 deletions

View File

@ -265,7 +265,8 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
if(field("imagesProtection").toBool())
pBox->SetBool("ProtectHostImages", true);
if (field("coverBoxedWindows").toBool())
pBox->SetBool("CoverBoxedWindows", true);
if (!Password.isEmpty())
pBox->ImBoxCreate(ImageSize / 1024, Password);
@ -769,6 +770,13 @@ CAdvancedPage::CAdvancedPage(QWidget *parent)
layout->addWidget(pImageProtection, row++, 1, 1, 3);
registerField("imagesProtection", pImageProtection);
QCheckBox* pWindowCover = new QCheckBox(tr("Prevents the sandboxed window from being captured."));
pImageProtection->setToolTip(tr("This feature can cause a decline in the user experience because it also prevents normal screenshots."));
pImageProtection->setChecked(theConf->GetBool("BoxDefaults/CoverBoxedWindows", false));
pImageProtection->setEnabled(g_CertInfo.active);
layout->addWidget(pImageProtection, row++, 1, 1, 3);
registerField("coverBoxedWindows", pImageProtection);
QString SharedTemplateName = tr("Shared Template");
QLabel* pSharedTemplateLbl = new QLabel(tr("Shared template mode"), this);
pSharedTemplateLbl->setToolTip(tr("This setting adds a local template or its settings to the sandbox configuration so that the settings in that template are shared between sandboxes."
@ -926,6 +934,7 @@ bool CSummaryPage::validatePage()
theConf->SetValue("BoxDefaults/BoxToken", field("boxToken").toBool());
theConf->SetValue("BoxDefaults/ImagesProtection", field("imagesProtection").toBool());
theConf->SetValue("BoxDefaults/CoverBoxedWindows", field("coverBoxedWindows").toBool());
theConf->SetValue("BoxDefaults/SharedTemplate", field("sharedTemplate").toInt());
}