diff options
author | Miguel Jacq <mig@mig5.net> | 2018-02-20 15:30:55 +1100 |
---|---|---|
committer | Miguel Jacq <mig@mig5.net> | 2018-02-20 15:30:55 +1100 |
commit | 2dd1d1395708b3d867178ca2ee9da344a8fd6aec (patch) | |
tree | d62876544bf8af3791fdd558302afc562d333788 | |
parent | 4457663ffed95d534717379d50328185e3a0aa3b (diff) | |
download | onionshare-2dd1d1395708b3d867178ca2ee9da344a8fd6aec.tar.gz onionshare-2dd1d1395708b3d867178ca2ee9da344a8fd6aec.zip |
Make the appearance of the download status icons occur consistently with the file info label
-rw-r--r-- | onionshare_gui/onionshare_gui.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index 50f920eb..c458030c 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -119,11 +119,12 @@ class OnionShareGui(QtWidgets.QMainWindow): self.info_in_progress_download_count = QtWidgets.QLabel() self.info_in_progress_download_count.setStyleSheet('QLabel { font-size: 12px; color: #666666; }') - self.info_in_progress_download_count.hide() self.info_completed_downloads_count = QtWidgets.QLabel() self.info_completed_downloads_count.setStyleSheet('QLabel { font-size: 12px; color: #666666; }') - self.info_completed_downloads_count.hide() + + self.update_downloads_completed(self.downloads_in_progress) + self.update_downloads_in_progress(self.downloads_in_progress) self.info_layout.addWidget(self.info_label) self.info_layout.addStretch() @@ -228,6 +229,7 @@ class OnionShareGui(QtWidgets.QMainWindow): file_count = self.file_selection.file_list.count() if file_count > 0: self.primary_action.show() + self.info_widget.show() # Update the file count in the info label total_size_bytes = 0 @@ -240,7 +242,6 @@ class OnionShareGui(QtWidgets.QMainWindow): self.info_label.setText(strings._('gui_file_info', True).format(file_count, total_size_readable)) else: self.info_label.setText(strings._('gui_file_info_single', True).format(file_count, total_size_readable)) - self.info_widget.show() else: self.primary_action.hide() @@ -366,8 +367,6 @@ class OnionShareGui(QtWidgets.QMainWindow): self.downloads_container.hide() self.downloads.reset_downloads() self.reset_info_counters() - self.info_in_progress_download_count.show() - self.info_completed_downloads_count.show() self.status_bar.clearMessage() self.server_share_status_label.setText('') @@ -676,8 +675,6 @@ class OnionShareGui(QtWidgets.QMainWindow): """ self.update_downloads_completed(0) self.update_downloads_in_progress(0) - self.info_in_progress_download_count.show() - self.info_completed_downloads_count.show() def update_downloads_completed(self, count): """ |