def _set_file_state()

in client/securedrop_client/gui/widgets.py [0:0]


    def _set_file_state(self) -> None:
        if self.file.is_decrypted:
            logger.debug(f"Changing file {self.uuid} state to decrypted/downloaded")
            self._set_file_name()
            self.download_button.hide()
            self.no_file_name.hide()
            self.export_button.show()
            self.middot.show()
            self.print_button.show()
            self.file_name.show()
            self.update_file_size()
        else:
            logger.debug(f"Changing file {self.uuid} state to not downloaded")
            self.download_button.setText(_("DOWNLOAD"))

            # Ensure correct icon depending on mouse hover state.
            if self.download_button.underMouse():
                self.download_button.setIcon(load_icon("download_file_hover.svg"))
            else:
                self.download_button.setIcon(load_icon("download_file.svg"))

            self.download_button.setFont(self.file_buttons_font)
            self.download_button.show()

            # Reset stylesheet
            self.download_button.setStyleSheet("")
            self.download_button.setObjectName("FileWidget_download_button")
            self.download_button.setStyleSheet(self.DOWNLOAD_BUTTON_CSS)

            self.no_file_name.hide()
            self.export_button.hide()
            self.middot.hide()
            self.print_button.hide()
            self.file_name.hide()
            self.no_file_name.show()