in client/securedrop_client/gui/conversation/export/export_wizard_page.py [0:0]
def _build_layout(self) -> QVBoxLayout:
layout = super()._build_layout()
# Passphrase Form
self.passphrase_form = QWidget()
self.passphrase_form.setObjectName("QWizard_passphrase_form")
passphrase_form_layout = QVBoxLayout()
passphrase_form_layout.setContentsMargins(
self.NO_MARGIN, self.NO_MARGIN, self.NO_MARGIN, self.NO_MARGIN
)
self.passphrase_form.setLayout(passphrase_form_layout)
passphrase_label = SecureQLabel(_("Passphrase"))
font = QFont()
font.setLetterSpacing(QFont.AbsoluteSpacing, self.PASSPHRASE_LABEL_SPACING)
passphrase_label.setFont(font)
self.passphrase_field = PasswordEdit(self)
self.passphrase_form.setObjectName("QWizard_passphrase_form")
self.passphrase_field.setEchoMode(QLineEdit.Password)
effect = QGraphicsDropShadowEffect(self)
effect.setOffset(0, -1)
effect.setBlurRadius(4)
effect.setColor(QColor("#aaa"))
self.passphrase_field.setGraphicsEffect(effect)
# Makes the password text accessible outside of this panel
self.registerField("passphrase*", self.passphrase_field)
check = SDCheckBox()
check.checkbox.stateChanged.connect(self.passphrase_field.on_toggle_password_Action)
passphrase_form_layout.addWidget(passphrase_label)
passphrase_form_layout.addWidget(self.passphrase_field)
passphrase_form_layout.addWidget(check, alignment=Qt.AlignRight)
layout.insertWidget(1, self.passphrase_form)
return layout