diff --git a/src/vorta/views/partials/password_input.py b/src/vorta/views/partials/password_input.py index ce10f30f..90e53cbc 100644 --- a/src/vorta/views/partials/password_input.py +++ b/src/vorta/views/partials/password_input.py @@ -170,3 +170,9 @@ def create_form_widget(self, parent: Optional[QWidget] = None) -> QWidget: self.add_form_to_layout(form_layout) widget.setLayout(form_layout) return widget + + def set_visibility(self, visible: bool) -> None: + self._label_password.setVisible(visible) + self._label_confirm.setVisible(visible) + self.passwordLineEdit.setVisible(visible) + self.confirmLineEdit.setVisible(visible) diff --git a/src/vorta/views/repo_add_dialog.py b/src/vorta/views/repo_add_dialog.py index cd265a33..9d191015 100644 --- a/src/vorta/views/repo_add_dialog.py +++ b/src/vorta/views/repo_add_dialog.py @@ -199,8 +199,10 @@ def encryption_listener(self): '''Validates passwords only if its going to be used''' if self.values['encryption'] == 'none': self.passwordInput.set_validation_enabled(False) + self.passwordInput.set_visibility(False) else: self.passwordInput.set_validation_enabled(True) + self.passwordInput.set_visibility(True) def display_backend_warning(self): '''Display password backend message based off current keyring'''