Remove upload/download toggle buttons

This commit is contained in:
Micah Lee 2018-09-19 19:36:16 -07:00
parent 499f7b1638
commit 1314ddf1be
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
7 changed files with 1 additions and 38 deletions

View File

@ -78,6 +78,7 @@ class Mode(QtWidgets.QWidget):
# Layout # Layout
self.layout = QtWidgets.QVBoxLayout() self.layout = QtWidgets.QVBoxLayout()
self.layout.addWidget(self.primary_action) self.layout.addWidget(self.primary_action)
self.layout.addStretch()
# Hack to allow a minimum width on self.layout # Hack to allow a minimum width on self.layout
min_width_widget = QtWidgets.QWidget() min_width_widget = QtWidgets.QWidget()
min_width_widget.setMinimumWidth(450) min_width_widget.setMinimumWidth(450)

View File

@ -53,12 +53,6 @@ class ReceiveMode(Mode):
self.new_upload = False # For scrolling to the bottom of the uploads list self.new_upload = False # For scrolling to the bottom of the uploads list
# Information about share, and show uploads button # Information about share, and show uploads button
self.info_show_uploads = QtWidgets.QToolButton()
self.info_show_uploads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/upload_window_gray.png')))
self.info_show_uploads.setCheckable(True)
self.info_show_uploads.toggled.connect(self.uploads_toggled)
self.info_show_uploads.setToolTip(strings._('gui_uploads_window_tooltip', True))
self.info_in_progress_uploads_count = QtWidgets.QLabel() self.info_in_progress_uploads_count = QtWidgets.QLabel()
self.info_in_progress_uploads_count.setStyleSheet(self.common.css['mode_info_label']) self.info_in_progress_uploads_count.setStyleSheet(self.common.css['mode_info_label'])
@ -72,7 +66,6 @@ class ReceiveMode(Mode):
self.info_layout.addStretch() self.info_layout.addStretch()
self.info_layout.addWidget(self.info_in_progress_uploads_count) self.info_layout.addWidget(self.info_in_progress_uploads_count)
self.info_layout.addWidget(self.info_completed_uploads_count) self.info_layout.addWidget(self.info_completed_uploads_count)
self.info_layout.addWidget(self.info_show_uploads)
self.info_widget = QtWidgets.QWidget() self.info_widget = QtWidgets.QWidget()
self.info_widget.setLayout(self.info_layout) self.info_widget.setLayout(self.info_layout)
@ -189,7 +182,6 @@ class ReceiveMode(Mode):
self.uploads_in_progress = 0 self.uploads_in_progress = 0
self.update_uploads_completed() self.update_uploads_completed()
self.update_uploads_in_progress() self.update_uploads_in_progress()
self.info_show_uploads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/upload_window_gray.png')))
self.uploads.reset() self.uploads.reset()
def update_uploads_completed(self): def update_uploads_completed(self):
@ -211,7 +203,6 @@ class ReceiveMode(Mode):
image = self.common.get_resource_path('images/share_in_progress_none.png') image = self.common.get_resource_path('images/share_in_progress_none.png')
else: else:
image = self.common.get_resource_path('images/share_in_progress.png') image = self.common.get_resource_path('images/share_in_progress.png')
self.info_show_uploads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/upload_window_green.png')))
self.info_in_progress_uploads_count.setText('<img src="{0:s}" /> {1:d}'.format(image, self.uploads_in_progress)) self.info_in_progress_uploads_count.setText('<img src="{0:s}" /> {1:d}'.format(image, self.uploads_in_progress))
self.info_in_progress_uploads_count.setToolTip(strings._('info_in_progress_uploads_tooltip', True).format(self.uploads_in_progress)) self.info_in_progress_uploads_count.setToolTip(strings._('info_in_progress_uploads_tooltip', True).format(self.uploads_in_progress))
@ -226,13 +217,3 @@ class ReceiveMode(Mode):
# Resize window # Resize window
self.adjustSize() self.adjustSize()
def uploads_toggled(self, checked):
"""
When the 'Show/hide uploads' button is toggled, show or hide the uploads window.
"""
self.common.log('ReceiveMode', 'toggle_uploads')
if checked:
self.uploads.show()
else:
self.uploads.hide()

View File

@ -79,12 +79,6 @@ class ShareMode(Mode):
self.info_label = QtWidgets.QLabel() self.info_label = QtWidgets.QLabel()
self.info_label.setStyleSheet(self.common.css['mode_info_label']) self.info_label.setStyleSheet(self.common.css['mode_info_label'])
self.info_show_downloads = QtWidgets.QToolButton()
self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_gray.png')))
self.info_show_downloads.setCheckable(True)
self.info_show_downloads.toggled.connect(self.downloads_toggled)
self.info_show_downloads.setToolTip(strings._('gui_downloads_window_tooltip', True))
self.info_in_progress_downloads_count = QtWidgets.QLabel() self.info_in_progress_downloads_count = QtWidgets.QLabel()
self.info_in_progress_downloads_count.setStyleSheet(self.common.css['mode_info_label']) self.info_in_progress_downloads_count.setStyleSheet(self.common.css['mode_info_label'])
@ -99,7 +93,6 @@ class ShareMode(Mode):
self.info_layout.addStretch() self.info_layout.addStretch()
self.info_layout.addWidget(self.info_in_progress_downloads_count) self.info_layout.addWidget(self.info_in_progress_downloads_count)
self.info_layout.addWidget(self.info_completed_downloads_count) self.info_layout.addWidget(self.info_completed_downloads_count)
self.info_layout.addWidget(self.info_show_downloads)
self.info_widget = QtWidgets.QWidget() self.info_widget = QtWidgets.QWidget()
self.info_widget.setLayout(self.info_layout) self.info_widget.setLayout(self.info_layout)
@ -316,16 +309,6 @@ class ShareMode(Mode):
# Resize window # Resize window
self.adjustSize() self.adjustSize()
def downloads_toggled(self, checked):
"""
When the 'Show/hide downloads' button is toggled, show or hide the downloads window.
"""
self.common.log('ShareMode', 'toggle_downloads')
if checked:
self.downloads.show()
else:
self.downloads.hide()
def reset_info_counters(self): def reset_info_counters(self):
""" """
Set the info counters back to zero. Set the info counters back to zero.
@ -334,7 +317,6 @@ class ShareMode(Mode):
self.downloads_in_progress = 0 self.downloads_in_progress = 0
self.update_downloads_completed() self.update_downloads_completed()
self.update_downloads_in_progress() self.update_downloads_in_progress()
self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_gray.png')))
self.downloads.reset() self.downloads.reset()
def update_downloads_completed(self): def update_downloads_completed(self):
@ -356,7 +338,6 @@ class ShareMode(Mode):
image = self.common.get_resource_path('images/share_in_progress_none.png') image = self.common.get_resource_path('images/share_in_progress_none.png')
else: else:
image = self.common.get_resource_path('images/share_in_progress.png') image = self.common.get_resource_path('images/share_in_progress.png')
self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_green.png')))
self.info_in_progress_downloads_count.setText('<img src="{0:s}" /> {1:d}'.format(image, self.downloads_in_progress)) self.info_in_progress_downloads_count.setText('<img src="{0:s}" /> {1:d}'.format(image, self.downloads_in_progress))
self.info_in_progress_downloads_count.setToolTip(strings._('info_in_progress_downloads_tooltip', True).format(self.downloads_in_progress)) self.info_in_progress_downloads_count.setToolTip(strings._('info_in_progress_downloads_tooltip', True).format(self.downloads_in_progress))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B