mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 08:49:30 -05:00
Merge branch 'info_widget_visibility_fixes' of https://github.com/mig5/onionshare into mig5-info_widget_visibility_fixes
This commit is contained in:
commit
6ac4584d2a
@ -121,11 +121,12 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
|
|
||||||
self.info_in_progress_download_count = QtWidgets.QLabel()
|
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.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 = QtWidgets.QLabel()
|
||||||
self.info_completed_downloads_count.setStyleSheet('QLabel { font-size: 12px; color: #666666; }')
|
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.addWidget(self.info_label)
|
||||||
self.info_layout.addStretch()
|
self.info_layout.addStretch()
|
||||||
@ -230,6 +231,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
file_count = self.file_selection.file_list.count()
|
file_count = self.file_selection.file_list.count()
|
||||||
if file_count > 0:
|
if file_count > 0:
|
||||||
self.primary_action.show()
|
self.primary_action.show()
|
||||||
|
self.info_widget.show()
|
||||||
|
|
||||||
# Update the file count in the info label
|
# Update the file count in the info label
|
||||||
total_size_bytes = 0
|
total_size_bytes = 0
|
||||||
@ -242,7 +244,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
self.info_label.setText(strings._('gui_file_info', True).format(file_count, total_size_readable))
|
self.info_label.setText(strings._('gui_file_info', True).format(file_count, total_size_readable))
|
||||||
else:
|
else:
|
||||||
self.info_label.setText(strings._('gui_file_info_single', True).format(file_count, total_size_readable))
|
self.info_label.setText(strings._('gui_file_info_single', True).format(file_count, total_size_readable))
|
||||||
self.info_widget.show()
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.primary_action.hide()
|
self.primary_action.hide()
|
||||||
@ -368,8 +369,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
self.downloads_container.hide()
|
self.downloads_container.hide()
|
||||||
self.downloads.reset_downloads()
|
self.downloads.reset_downloads()
|
||||||
self.reset_info_counters()
|
self.reset_info_counters()
|
||||||
self.info_in_progress_download_count.show()
|
|
||||||
self.info_completed_downloads_count.show()
|
|
||||||
self.status_bar.clearMessage()
|
self.status_bar.clearMessage()
|
||||||
self.server_share_status_label.setText('')
|
self.server_share_status_label.setText('')
|
||||||
|
|
||||||
@ -678,8 +677,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
"""
|
"""
|
||||||
self.update_downloads_completed(0)
|
self.update_downloads_completed(0)
|
||||||
self.update_downloads_in_progress(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):
|
def update_downloads_completed(self, count):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user